-
Notifications
You must be signed in to change notification settings - Fork 7
60 lines (53 loc) · 1.67 KB
/
main.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
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
pip install sphinx
pip install sphinx_rtd_theme
pip install m2r2
pip install platformdirs
pip install numpy
pip install tqdm
pip install ffmpeg-python
pip install sphinx_autodoc_typehints
pip install git+https://github.com/sphinx-contrib/googleanalytics
pip install "docutils>=0.18.1,<0.21"
- name: Build docs
run: |
chmod +x ./docs/build_docs.sh
./docs/build_docs.sh
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
path: .deploy
token: ${{ secrets.GITHUB_TOKEN }}
- name: Copy docs to gh-pages branch
run: cp -r docs/_build/* .deploy/
- name: Commit and push
run: |
cd .deploy
git config user.email "[email protected]" --local
git config user.name "GitHub Action" --local
git add .
git commit -m "Update documentation" -a || true
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/OllieBoyne/BlenderSynth.git
git push origin gh-pages --force