neovim/.github/workflows/api-docs.yml
dundargoc ce6fefbab9 ci: create setup action
This deduplicates common operations.
2023-12-01 16:59:23 +01:00

35 lines
1000 B
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
- uses: ./.github/actions/setup
- name: Install dependencies
run: |
sudo apt-get install -y doxygen python3-msgpack
- 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