-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.52 KB
/
mkdocs-deploy.yml
File metadata and controls
55 lines (49 loc) · 1.52 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
name: Generate documentation and deploy to GitHub pages
on:
# Documentation can be either manually updated or is automatically updated when pushed to main branch
workflow_dispatch:
push:
branches:
- main
# Make sure deploy-pages has necessary permissions to deploy to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Cancel older deploy workflow when more than one is running
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
name: Build and deploy documentation site
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }} # Output URL after the workflow has finished
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v6
with:
# Pinned Python version
python-version-file: ".python-version"
- run: uv sync --group docs
# Build documentation to ./site/ directory
- name: Build Documentation
id: build
run: uv run mkdocs build
# Upload artifact from the ./site/ directory using the expected format for GitHub Pages
- name: Upload Artifact
id: upload
uses: actions/upload-pages-artifact@v4
with:
path: ./site/
# Use previously uploaded artifact to deploy to GitHub Pages
- name: Deploy
id: deploy
uses: actions/deploy-pages@v5