Skip to content

Commit a115215

Browse files
authored
Auto deploy docs / PR 3
Auto deploy docs
2 parents dbc9af1 + e236ac4 commit a115215

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

.github/workflows/docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
deploy_docs:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
- name: Setup uv
27+
uses: astral-sh/setup-uv@v5
28+
with:
29+
enable-cache: true
30+
- name: Install dependencies
31+
run: make sync
32+
- name: Build docs
33+
run: mkdocs build --strict --site-dir site
34+
- name: Configure Pages
35+
uses: actions/configure-pages@v5
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: site
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ build-full-docs:
4848
.PHONY: serve-docs
4949
serve-docs:
5050
uv run mkdocs serve
51-
#
52-
# .PHONY: deploy-docs
53-
# deploy-docs:
54-
# uv run mkdocs gh-deploy --force --verbose
51+
.PHONY: deploy-docs
52+
deploy-docs:
53+
uv run mkdocs gh-deploy --force --verbose

0 commit comments

Comments
 (0)