Skip to content

Commit 40e2829

Browse files
Add basic documentation deployment workflow
1 parent d313040 commit 40e2829

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/cd-docs.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: deploy-docs
2+
on:
3+
workflow_dispatch:
4+
push:
5+
# Uncomment these lines before merge
6+
# branches:
7+
# - master
8+
permissions:
9+
contents: write
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
17+
- name: Configure Git Credentials
18+
run: |
19+
git config user.name github-actions[bot]
20+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
21+
22+
- name: Set up Python 3.10
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.10'
26+
cache: 'pip'
27+
28+
- name: Save time for cache for mkdocs
29+
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
30+
31+
- name: Caching
32+
uses: actions/cache@v4
33+
with:
34+
key: mkdocs-material-${{ env.cache_id }}
35+
path: .cache
36+
restore-keys: |
37+
mkdocs-material-
38+
39+
- name: Install Dependencies
40+
run: pip install mkdocs mkdocs-material mkdocstrings[python] griffe-inherited-docstrings mkdocs-autorefs black mkdocs-jupyter mkdocs-caption mkdocstrings-c
41+
42+
- name: Deploy to GitHub Pages
43+
run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)