-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (43 loc) · 1.18 KB
/
create-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
40
41
42
43
44
45
46
47
48
49
50
51
name: Create Documentation
on:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
paths:
- 'classy_config/**'
- 'docs/**'
push:
branches:
- main
jobs:
create-documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install poetry
poetry install
- name: Generate Documenation
run: poetry run sphinx-apidoc --output-dir ./docs/source/reference classy_config --separate --no-toc --module-first
- name: Build HTML
run: |
cd docs
poetry run make html
touch build/html/.nojekyll
- name: Documentation Artifacts
uses: actions/upload-artifact@v2
with:
name: documentation
path: |
docs/build/html/*
- name: Deploy Page
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/main'
with:
branch: gh-pages
folder: docs/build/html # The folder the action should deploy.