mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
3c803483ac
Auto-merging is a useful feature by github, but it requires required checks which requires a few adjustments. The primary change is that required checks can't use `paths` or `paths-ignore` as that risks not running the job, and required checks must always be run. A workaround for this is to introduce a dummy workflow which is used for every path not used in the real workflow. That way the required job is "always" run as far as github is concerned. The workaround is unweildly so it's only useful to do it for costly workflows where the potential benefits are big. If not it's better to simply remove any `paths` or `paths-ignore` from a workflow instead.
27 lines
720 B
YAML
27 lines
720 B
YAML
name: docs
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
jobs:
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.draft == false
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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
|