-
Notifications
You must be signed in to change notification settings - Fork 9
61 lines (51 loc) · 1.51 KB
/
docs.yaml
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
name: Documentation build and deploy
on:
push:
branches: [ master ]
tags: ['*']
pull_request:
branches: [ master ]
workflow_dispatch:
concurrency:
group: CI-docs-${{ github.ref }}
cancel-in-progress: true
jobs:
sphinx-build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- name: Install mamba
uses: mamba-org/setup-micromamba@main
with:
environment-file: docs/environment.yml
- name: Build anypytools
shell: bash -l {0}
run: pip install .
- name: Build Documentation
shell: bash -l {0}
run: |
set -e
cd docs
make html-dev
cd ..
mkdir -p public/dev
cp -rT docs/_build/html public/dev
- name: Build last tagged version
if: github.ref == 'refs/heads/master'
shell: bash -l {0}
run: |
git checkout $(git describe --tags `git rev-list --tags --max-count=1`);
cd docs
make clean
make html
cd ..
cp -rT docs/_build/html public
- name: Deploy 🚀
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: AnyBody-Research-Group/anypytools-docs
publish_branch: gh-pages
publish_dir: ./public