Repository navigation
67 lines (61 loc) · 2.18 KB
/
Copy pathdocs.yml
File metadata and controls
67 lines (61 loc) · 2.18 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
67
name: Docs
# Validate the curated public docs on pull requests and publish that same output
# to GitHub Pages from main.
#
# Pull requests that change only Release Please-managed files (the release PR
# and the main->dev back-merge PR) do not rebuild the docs (#1266). The push to
# main is not filtered: the published docs render the release version, so the
# release commit must still redeploy them.
on:
push:
branches: [main]
pull_request:
branches: [main, dev]
paths-ignore:
- CHANGELOG.md
- .release-please-manifest.json
- implementations/python/packages/raes/_version.py
workflow_dispatch:
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12.14"
- name: Install uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v8
with:
enable-cache: false
version: "0.12.4"
- name: Validate and build public docs
run: uv run --project implementations/tooling/python --frozen --no-default-groups nox -f noxfile.py -s docs-local
- name: Check external documentation links
run: uv run --project implementations/tooling/python --frozen --no-default-groups nox -f noxfile.py -s docs-links
- name: Upload Pages artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: docs/_build/html
deploy:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-24.04
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1