mirror of
https://github.com/neovim/neovim.git
synced 2026-03-28 11:22:03 +00:00
The default workflow permissions are overly broad; setting permissions explicitly at the workflow level ensures excessive permissions are not unintentionally granted to jobs. For details, see: https://docs.zizmor.sh/audits/#excessive-permissions
32 lines
789 B
YAML
32 lines
789 B
YAML
name: docs
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.draft == false
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./.github/actions/setup
|
|
|
|
- name: Generate docs
|
|
run: |
|
|
make doc
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
echo "::error::Job failed, run 'make doc' and commit your doc changes."
|
|
echo "::error::The doc generation produces the following changes:"
|
|
git diff --color --exit-code
|
|
fi
|
|
|
|
- name: Validate docs
|
|
run: make lintdoc
|