-
Notifications
You must be signed in to change notification settings - Fork 28
48 lines (37 loc) · 1.26 KB
/
publish_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
name: Publish documentation
on:
push:
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v2
name: Check out source-code repository
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.9
- name: Install pip
run: python -m pip install --upgrade pip
# Required to automatically extract Click CLI and Flask API documentation
- name: Install MegaQC
run: pip install -e .[dev]
- name: Install documentation dependencies
run: pip install -r docs/requirements.txt
- name: Create API documentation
run: |
cd docs
make api-docs
- name: Build documentation
run: |
cd docs
make html
echo "megaqc.info" > _build/html/CNAME
# TODO: We could also build latex & PDF documentation and upload them as artifacts
- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html