-
Notifications
You must be signed in to change notification settings - Fork 34
61 lines (53 loc) · 1.58 KB
/
docs.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
name: Docs
on:
push:
branches:
- main
- docs
jobs:
Docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.10"
- name: Requirements
run: |
sudo apt-get update
sudo apt-get install doxygen python3-sphinx graphviz
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build release docs
run: |
HEAD=$(git rev-parse HEAD)
git fetch --all --tags
cd docs
for version in $(git tag -l); do
echo "Processing $version:"
git checkout $version
pip install --force-reinstall -v "ipctk==$version"
sphinx-build source build/html/$version -D html_theme_options.version_dropdown=true
done
pip uninstall -y ipctk
git checkout $HEAD
cp source/_static/versions.json build/html/
cd ..
- name: Build ipctk
run: pip install --verbose .
- name: Build docs
run: |
cd docs
make html
cd build/html
touch .nojekyll
- name: Deploy
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/build/html # The folder the action should deploy.