Commit 303d54c
ci(docs): always trigger docs workflow on PRs; move filtering into workflow (#1544)
* ci(docs): always trigger on PRs, move file filtering into workflow
- Drop the `paths` trigger filters so the docs workflow always runs
on pull requests (and pushes) and reliably reports its check status.
- Add a `changes` job using dorny/paths-filter@v3 to detect doc-related
changes inside the workflow with recursive globs (`flaml/**`,
`website/**`, `.github/workflows/deploy-website.yml`).
- Gate `checks` and `gh-release` on the filter output so the heavy
steps are skipped when no doc-related files changed, while
`workflow_dispatch` (and `merge_group` for `checks`) can still
force a run.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* ci(docs): grant pull-requests:read for dorny/paths-filter, scope contents:write to deploy
Address review: dorny/paths-filter@v3 calls the GitHub PR Files API on
pull_request events and needs `pull-requests: read`. Without it, the
`changes` job can fail with 403 on PRs and block downstream jobs via
`needs: changes`.
- Drop workflow-level `contents: write`; default to least-privilege
`contents: read` and add `pull-requests: read` so the filter can read
PR file lists.
- Move `contents: write` to the `gh-release` job only, where
peaceiris/actions-gh-pages needs it to push to the gh-pages branch.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* ci(docs): keep workflow-level contents:write, only add pull-requests:read
Per review feedback, restore `contents: write` at the workflow level
(needed by gh-release for peaceiris/actions-gh-pages to push to
gh-pages) and just additively grant `pull-requests: read` so
dorny/paths-filter@v3 can read PR file lists via the GitHub API.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: thinkall <thinkall@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 51fca27 commit 303d54c
1 file changed
Lines changed: 20 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 6 | | |
11 | 7 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 8 | | |
17 | 9 | | |
18 | 10 | | |
19 | 11 | | |
20 | 12 | | |
21 | 13 | | |
| 14 | + | |
22 | 15 | | |
23 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | | - | |
| 33 | + | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
| |||
58 | 67 | | |
59 | 68 | | |
60 | 69 | | |
61 | | - | |
| 70 | + | |
| 71 | + | |
62 | 72 | | |
63 | 73 | | |
64 | 74 | | |
| |||
0 commit comments