Skip to content

Commit b4f875e

Browse files
committed
ci(docs): deploy docs on GitHub Pages on push
1 parent ad9fc06 commit b4f875e

2 files changed

Lines changed: 36 additions & 4 deletions

File tree

.github/workflows/deploy-docs.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish docs to GitHub Pages
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: write
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Configure Git Credentials
15+
run: |
16+
git config user.name github-actions[bot]
17+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
18+
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v6
21+
22+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
23+
24+
- uses: actions/cache@v4
25+
with:
26+
key: mkdocs-material-${{ env.cache_id }}
27+
path: ~/.cache
28+
restore-keys: |
29+
mkdocs-material-
30+
31+
- name: Install dependencies
32+
run: uv sync --locked --all-extras --dev
33+
34+
- name: Build docs
35+
run: uv run mkdocs gh-deploy --force

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,4 @@ test-debug: ## Spawn an interactive shell in the test container to debug
2626
@docker compose run --rm test /bin/bash
2727

2828
doc-serve: ## Serve the documentation locally
29-
@mkdocs serve
30-
31-
doc-deploy: ## Build and deploy docs to the gh-pages branch
32-
@mkdocs gh-deploy --no-history --force --strict
29+
@mkdocs serve

0 commit comments

Comments
 (0)