-
Notifications
You must be signed in to change notification settings - Fork 11
39 lines (37 loc) · 1.31 KB
/
documentation.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
name: Documentation
on: [push]
jobs:
build-documentation:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0} # Required for conda commands.
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: develop # Checkout `develop` branch to build documentation instead of using current branch / commit.
fetch-depth: 0 # Fetch all branches and tags, to build documentation for all branches and tags.
submodules: false # Not needed to build documentation.
- name: Set up Python
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
conda install sphinx
pip install -r docs/requirements.txt
- name: Build documentation HTML with Sphinx
run: |
sphinx-multiversion docs docs/_build/html
cp docs/assets/gh-pages_index.html docs/_build/html/index.html
- name: Deploy documentation HTML to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html/
keep_files: false
force_orphan: true
full_commit_message: Deploy documentation for ${{ github.sha }}
user_name: MESMO Bot
user_email: [email protected]