forked from fliphess/miicam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
73 lines (61 loc) · 3.11 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
dist: bionic
git:
submodules: false
env:
global:
- 'CACHEDIR=/home/travis/.cache/miicam/src'
- 'WEBHOOK=https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh'
cache:
directories:
- /home/travis/.cache/miicam/src
jobs:
include:
##############################################################################
## Build stage ##
##############################################################################
- name: Build
sudo: required
language: python
python: 3.6
before_install:
- docker ps -a
- docker pull quay.io/miicam/miicam
- docker build --cache-from quay.io/miicam/miicam -t miicam/miicam .
script:
- mkdir -p "${CACHEDIR}"
- docker run -i -v "$(pwd):/result" -v "${CACHEDIR}:/env/src" --detach=false --rm --tty=true miicam/miicam /bin/bash -c 'make images clean && cp /env/MiiCam.* /result/'
services:
- docker
deploy:
provider: releases
api_key:
secure: tQzN8M2tmdruwXiISw3rXMoz9ZNNOIabOC9MCxjihbQiQ5rXC3dqRlqtq3YC5PIg+FkfPuTH7OLH9QrC1N2O6sPD8VKsDkFMHyY3NG6AXfvpBVAP+u0RfH2hOxVQyMQ5DnvSFlGcYkef3X7OypRHcFSJSx5+IZHkPFkOpSxVQJu3PCGicO4qFRa2ALev/hosLO8zH8TN0cJi8353EXqH6f6mHoJTsLI0WpcZ0Bql4g1QqlEb6cs34rJB53ydboClv8E1fIG1E15k83kTa5J7hoGUVHfzWP0sode1vZbdr7gpMtAzL+kpuHTOZ+YsS63HxC+M7lw4UPKBDZ1v0nPPX1rW177kGOMBzCHlqXhgK3fhMpZ9BZ58gFklFa4tqrbJSLq2jNYm4EWK7JM5TycMhkl4EwqEe4UdxXgj28WeehsBUChGqAS6ofpvHCf/mVg3cF7Px/MVhChA4JVPl8UV0sY5jlQwGXuEaNh10+yq0faSH9kWwkdCX3aeq2CXi5h5eB+Lac4Wt0YlnEmqZAVv1N01TqD29naXEuzJ2P5xw9rc1nWV1wiRmu1TQ+kwmoEbjGscIMxFO1tUfa1lPm30Ik1yKmitA5oIZTYGyXW9lPegsMOHxpkuTAZzw6KhCKUrdrP2XdPFT7fjelZe5fB/U4aEb8Y+S5OPYyaQQq1wVkI=
file_glob: true
file: MiiCam.*
skip_cleanup: true
on:
tags: true
##############################################################################
## Documentation ##
##############################################################################
- name: Documentation
sudo: false
language: python
python:
- 3.7
cache: .pip
before_install:
- openssl aes-256-cbc -K $encrypted_92725ca94bf5_key -iv $encrypted_92725ca94bf5_iv -in ${TRAVIS_BUILD_DIR}/docs/deploy-key.enc -out ${TRAVIS_BUILD_DIR}/docs/deploy-key -d
- git config --global user.name "Travis Deploy Bot"
- git config --global user.email "[email protected]"
- chmod 600 ${TRAVIS_BUILD_DIR}/docs/deploy-key
- eval `ssh-agent -s`
- ssh-add ${TRAVIS_BUILD_DIR}/docs/deploy-key
- pip3 install -r ${TRAVIS_BUILD_DIR}/docs/requirements.txt
script:
- git clone [email protected]:miicam/github.com/balves42/miicam_2022/blob/master/docs/content.git ${TRAVIS_BUILD_DIR}/docs/docs-repo
- cd ${TRAVIS_BUILD_DIR}/docs && mkdocs build --verbose --clean --strict
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then cd ${TRAVIS_BUILD_DIR}/docs/docs-repo && git add . && git commit -am "Update documention by travis" && git push -u origin master; fi;
after_script:
- ssh-add -D
- rm ${TRAVIS_BUILD_DIR}/docs/deploy-key