-
-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (42 loc) · 1.37 KB
/
generate-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
#----------------------------------------------
# Generate and upload documentation (only push to main)
#----------------------------------------------
name: Generate documentation
on:
pull_request:
# on pull request we just want to build to see nothing is broken
paths:
- "README.md"
- "docs/**"
- ".github/workflows/generate-docs.yml"
- "mkdocs.yml"
push:
branches:
- main
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install mkdocs requirements
run: |
pip install mkdocs-material
pip install mdx_truly_sane_lists
- name: Generate documentation
run: |
bash ./build_mkdocs.sh
mkdocs build
- name: Deploy documentation to Github Pages 🚀
# we only deploy on push to main
if: |
github.event_name == 'push' && github.event.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: gh_pages # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch