Skip to content

Commit 7232aba

Browse files
committed
ci: add github action to deploy docs
1 parent 72701ea commit 7232aba

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/deploy_docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy Documentation
2+
on:
3+
push:
4+
branches: [main]
5+
permissions:
6+
contents: write
7+
pages: write
8+
id-token: write
9+
concurrency:
10+
group: "pages"
11+
cancel-in-progress: false
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
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+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version-file: ".python-version"
25+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v5
28+
with:
29+
enable-cache: true
30+
cache-dependency-glob: "uv.lock"
31+
- name: Install dependencies
32+
run: |
33+
uv venv
34+
uv sync --dev
35+
- name: Initialize cache
36+
uses: actions/cache@v4
37+
with:
38+
key: mkdocs-material-${{ env.cache_id }}
39+
path: .cache
40+
restore-keys: |
41+
mkdocs-material-
42+
- name: Deploy documentation
43+
run: |
44+
source .venv/bin/activate
45+
mkdocs gh-deploy --force

0 commit comments

Comments
 (0)