Skip to content

Commit 72289be

Browse files
ci: switch docs deploy to GitHub Actions Pages (actions/deploy-pages)
1 parent 94e4877 commit 72289be

1 file changed

Lines changed: 25 additions & 8 deletions

File tree

.github/workflows/docs.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,18 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
permissions:
15-
contents: write # needed to push to the gh-pages branch
15+
contents: read
16+
pages: write # needed by actions/deploy-pages
17+
id-token: write # needed by actions/deploy-pages (OIDC)
1618

1719
jobs:
18-
deploy:
19-
name: Build & deploy MkDocs site
20+
build:
21+
name: Build MkDocs site
2022
runs-on: ubuntu-latest
2123

2224
steps:
2325
- uses: actions/checkout@v4
2426
with:
25-
# Full history is not needed for a simple mkdocs gh-deploy, but
26-
# fetch-depth: 0 gives mkdocs-git-revision-date accurate dates if
27-
# you add that plugin later.
2827
fetch-depth: 0
2928

3029
- name: Install uv
@@ -40,5 +39,23 @@ jobs:
4039
- name: Install dependencies
4140
run: uv sync --group dev
4241

43-
- name: Build & deploy to GitHub Pages
44-
run: uv run mkdocs gh-deploy --force --clean --verbose
42+
- name: Build docs
43+
run: uv run mkdocs build --clean --strict
44+
45+
- name: Upload Pages artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: site/
49+
50+
deploy:
51+
name: Deploy to GitHub Pages
52+
needs: build
53+
runs-on: ubuntu-latest
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deploy.outputs.page_url }}
57+
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deploy
61+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)