-
Notifications
You must be signed in to change notification settings - Fork 235
42 lines (38 loc) · 1.24 KB
/
deploy_mkdocs.yml
File metadata and controls
42 lines (38 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Publish docs via GitHub Pages
on:
push:
branches:
- main
paths:
# Only rebuild website when docs have changed
- 'README.md'
- 'CHANGES.md'
- 'CONTRIBUTING.md'
- 'deployment/**'
- 'docs/**'
- '.github/workflows/deploy_mkdocs.yml'
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
environment: github-pages
permissions:
contents: write # mkdocs gh-deploy pushes the built site to gh-pages
steps:
- name: Checkout main
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.9.*"
enable-cache: false
- name: Deploy docs
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
uv run --group docs mkdocs gh-deploy --force -f docs/mkdocs.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}