Docs: migration guide should flag new `pull-requests: write` requirement for `doc-deploy-dev`
- Dominant language
- Python
- Stars
- 19
- Forks
- 7
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 70
Description
### Summary
Since `v10.2`, `doc-deploy-dev` performs the cleanup of closed-PR directories previously handled by `doc-deploy-pr` on the `closed` event. That cleanup calls `gh pr view` and `gh pr comment`, which require `pull-requests: write` on the deploying job's `GITHUB_TOKEN`.
The [action reference page](https://actions.docs.ansys.com/version/stable/doc-actions/index.html#doc-deploy-dev-action) documents this requirement, but the [v11 migration guide](https://actions.docs.ansys.com/version/stable/migrations/index.html#version-v11) and [Deploy documentation from a pull request](https://actions.docs.ansys.com/version/stable/migrations/docs-deploy-pr-setup.html) page do not mention it. Projects that upgraded from `/`), then close/merge the PR.
- Next scheduled run: `Clean up pull/ directory if it exists` step exits 1 with no visible script output. Example: https://github.com/ansys/pystk-mcp/actions/runs/33822215417/job/100868012889
### Suggested fix
- Add a note in the v11 migration guide (and in `docs-deploy-pr-setup.html`) explaining that `doc-deploy-dev` now needs `pull-requests: write` on the deploying job, with a minimal `permissions:` snippet.
- Optional but nice: make the cleanup step surface the `gh` error (drop `2>/dev/null` on failure, or `set +e` around the block) so misconfiguration produces an actionable error instead of a silent exit 1.
### Workaround
Add `pull-requests: write` to the `doc-deploy-dev` job's `permissions:` block:
```yaml
doc-deploy-dev:
permissions:
contents: write # Required to publish development documentation.
pull-requests: write # Required by doc-deploy-dev cleanup logic (gh pr view/comment).
```
Contributor guide
Research direction
Read the v11 migration guide, the “Deploy documentation from a pull request” page, and the doc-deploy-dev action reference linked in the issue. Add the pull-requests: write requirement and minimal permissions snippet to both migration pages, then verify that upgraded workflows can identify the required permission from the documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100