diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-05-24 00:14:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 00:14:42 +0200 |
commit | 599cf6f60c1d4e88ad950063a2c3dcf357cef9f8 (patch) | |
tree | 4a746e0e60194ce3086ceedccf830c07bfbdf7b1 | |
parent | d4dc884012e80b48a99754bf09824b5f7ae6ff2b (diff) | |
download | rneovim-599cf6f60c1d4e88ad950063a2c3dcf357cef9f8.tar.gz rneovim-599cf6f60c1d4e88ad950063a2c3dcf357cef9f8.tar.bz2 rneovim-599cf6f60c1d4e88ad950063a2c3dcf357cef9f8.zip |
ci: remove api-docs-check workflow
Having a workflow that creates a PR with the necessary changes on master
is redundant as this check is enforced for each PR anyway.
-rw-r--r-- | .github/workflows/api-docs-check.yml | 18 | ||||
-rw-r--r-- | .github/workflows/api-docs.yml | 42 |
2 files changed, 3 insertions, 57 deletions
diff --git a/.github/workflows/api-docs-check.yml b/.github/workflows/api-docs-check.yml deleted file mode 100644 index 0a57df7c33..0000000000 --- a/.github/workflows/api-docs-check.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Missing API docs -on: - pull_request: - branches-ignore: - - 'marvim/api-doc-update**' - paths: - - 'src/nvim/api/*.[ch]' - - 'runtime/lua/**.lua' - - 'runtime/doc/**' - -jobs: - call-regen-api-docs: - permissions: - contents: write - pull-requests: write - uses: ./.github/workflows/api-docs.yml - with: - check_only: true diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index af0397c7cb..f083d32fce 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -1,23 +1,11 @@ -# Autogenerate the API docs on new commit to important branches -# Also work as a check for PR's to not forget committing their doc changes -# called from api-docs-check.yml +# Check if any PR needs to run the autogenerate script name: Autogenerate API docs on: - push: + pull_request: paths: - 'src/nvim/api/*.[ch]' - 'runtime/lua/**.lua' - 'runtime/doc/**' - branches: - - 'master' - - 'release-[0-9]+.[0-9]+' - workflow_dispatch: - workflow_call: - inputs: - check_only: - type: boolean - default: false - required: false jobs: regen-api-docs: @@ -25,50 +13,26 @@ jobs: permissions: contents: write pull-requests: write - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: rhysd/action-setup-vim@v1 with: neovim: true version: nightly - uses: actions/checkout@v3 - with: - # Fetch depth 0 is required if called through workflow_call. In order - # to create a PR we need to access other branches, which requires a - # full clone. - fetch-depth: 0 - - name: Install dependencies run: | sudo apt-get update sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack - - name: Set up git config - run: | - git config --global user.name 'marvim' - git config --global user.email 'marvim@users.noreply.github.com' - - - run: printf 'DOC_BRANCH=marvim/api-doc-update/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV - - name: Generate docs id: docs run: | - git checkout -b ${DOC_BRANCH} python3 scripts/gen_vimdoc.py 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 && inputs.check_only }} + if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} run: | echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes" echo "The doc generation produces the following changes:" git diff --color --exit-code - - - name: Automatic PR - if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && !inputs.check_only }} - run: | - git add -u - git commit -m 'docs: regenerate [skip ci]' - git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${DOC_BRANCH} - gh pr create --draft --fill --base ${GITHUB_REF#refs/heads/} --head ${DOC_BRANCH} || true |