-
Notifications
You must be signed in to change notification settings - Fork 9
36 lines (31 loc) · 1022 Bytes
/
build_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
name: Build Github Pages Docs
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Cache dependences
uses: actions/cache@v3
with:
path: ~/.cache/pip
# Unique cache key based on requirements.txt in docs directory
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}-mkdocs-deps
# Restore partial cache if exact match is not found
restore-keys: |
${{ runner.os }}-pip-
- name: Install mkdocs and dependencies
run: |
pip install mkdocs mkdocs-material mkdocstrings mkdocstrings-python mkdocs-open-in-new-tab
- name: Build and deploy mkdocs site to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mkdocs gh-deploy --force