mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
b2ca768196
Checking the documentation generation is mostly useful towards the end of a pull request like with the lintcommit workflow.
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
# Check if any PR needs to run the autogenerate script
|
|
name: Autogenerate API docs and types
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
paths:
|
|
- 'src/nvim/api/*.[ch]'
|
|
- 'src/nvim/eval.lua'
|
|
- 'runtime/lua/**.lua'
|
|
- 'runtime/doc/**'
|
|
|
|
jobs:
|
|
regen-api-docs-and-types:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.draft == false
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install dependencies
|
|
run: |
|
|
./.github/scripts/install_deps.sh
|
|
sudo apt-get install -y doxygen python3-msgpack
|
|
- uses: ./.github/actions/cache
|
|
|
|
- name: Generate docs
|
|
run: |
|
|
make doc
|
|
printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT
|
|
|
|
- name: FAIL, PR has not committed doc changes
|
|
if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }}
|
|
run: |
|
|
echo "Job failed, run 'make doc' and commit your doc changes."
|
|
echo "The doc generation produces the following changes:"
|
|
git diff --color --exit-code
|