Repository navigation
77 lines (66 loc) · 3.23 KB
/
Copy pathupdate-docs.yml
File metadata and controls
77 lines (66 loc) · 3.23 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
68
69
70
71
72
73
74
75
76
77
name: Update docs versions
on:
# Weekly cron temporarily disabled until the repo setting "Allow GitHub
# Actions to create and approve pull requests" is verified on
# praxis-proxy.github.io. Re-enable by uncommenting after a manual
# workflow_dispatch run is proven green (migration decision O2).
# schedule:
# # Weekly, Mondays 06:00 UTC
# - cron: "0 6 * * 1"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
# starts the check workflow on the docs pull request branch (see below)
actions: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
submodules: true
# tools/docs.py runs its own Git subprocesses; keep the token out of
# the repository Git config since this job never pushes directly.
persist-credentials: false
- name: Refresh docs defaults and source pointers
run: python3 tools/docs.py update-doc-versions
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Refresh development channel SHAs from tracked upstream refs
run: python3 tools/docs.py update-dev-versions
# Build and validate the updated snapshots before opening the PR. A PR
# created with the default github.token does not trigger the pull_request
# workflows (check.yml), so gate the docs here instead; a broken update
# fails this run and no PR is opened.
- name: Build and check the updated docs
run: make check
- name: Open pull request
id: cpr
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
branch: automation/update-doc-versions
title: "chore(website): update docs versions to latest releases"
commit-message: "chore(website): update docs versions to latest releases"
body: |
Automated run of `update-doc-versions` + `update-dev-versions`.
- Promotes each project's docs default to the latest published stable
release and moves the matching submodule pointer.
- Refreshes the development channel SHAs (`development` in
`data/docs_versions.json`) from each project's tracked upstream ref
so the unreleased "Development" docs stay current.
This PR is opened only after `make check` (build plus internal
link/fragment and presentation checks) passes on the updated
snapshots. Review the catalog and pointer changes before merging.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
delete-branch: true
# The pull request is opened with github.token, which fires no
# pull_request events, so start the check workflow on its branch. Its run
# checks the pull request's head commit, which is the required check for
# this pull request. workflow_dispatch is the event github.token can use.
- name: Run checks on the docs pull request
if: steps.cpr.outputs.pull-request-number != ''
run: gh workflow run check.yml --ref automation/update-doc-versions
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}