Repository navigation
59 lines (49 loc) · 1.52 KB
/
Copy pathdocs.yml
File metadata and controls
59 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
56
57
58
59
name: Deploy Documentation
# Docs deploy only when a public version ships: after the "Publish to PyPI"
# workflow finishes successfully, or on a manual run. Routine pushes to main
# (and work on develop) do NOT update the public site.
on:
workflow_run:
workflows: ["Publish to PyPI"]
types: [completed]
workflow_dispatch: # allow manual rebuilds
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
# Only build on a successful publish, or when triggered manually.
if: >
github.event_name == 'workflow_dispatch'
|| github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies
run: uv sync --group docs
- name: Build documentation
run: uv run mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
# Canonical public URL; deploy-pages' page_url output reports GitHub's
# internal *.pages.github.io alias for org repos, so hardcode it.
url: https://pnnl.github.io/comcheckweb-api-python/
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5