-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (57 loc) · 1.59 KB
/
Copy pathpages.yml
File metadata and controls
66 lines (57 loc) · 1.59 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# .github/workflows/pages.yml
# Builds the MkDocs site and deploys it to GitHub Pages on every docs change.
# NOTE: the repo's Pages site must be enabled ONCE out-of-band (the Actions token
# cannot create it):
# gh api -X POST repos/OWNER/REPO/pages -f build_type=workflow
name: Pages
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "README.md"
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/pages.yml"
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ${{ vars.RUNNER || 'ubuntu-latest' }}
steps:
- name: Check out repository
uses: actions/checkout@v7.0.0
- name: Install Python
uses: actions/setup-python@v6.3.0
with:
python-version: "3.13"
- name: Configure Pages
uses: actions/configure-pages@v6.0.0
with:
enablement: true # no-op once the site exists; see header note
- name: Build site
shell: bash
run: |
set -euo pipefail
python -m pip install --upgrade pip mkdocs mkdocs-material
mkdocs build --strict --site-dir site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5.0.0
with:
path: site
deploy:
needs: build
runs-on: ${{ vars.RUNNER || 'ubuntu-latest' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5.0.0