ci: rules api docs from wiki

This commit is contained in:
zztrieuzz 2021-12-08 20:27:46 +07:00
parent f104b9bf84
commit 4f8f8778f1
3 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,6 @@
generatedFiles:
- path: "doc/nvim-autopairs.txt"
- path: "doc/nvim-autopairs-rules.txt"
message: "`nvim-autopairs.txt` is generated from README.md. Make changes there instead."
ignoreAuthors:
- 'github-actions[bot]'

View File

@ -6,7 +6,6 @@ on:
- README.md
branches:
- master
jobs:
docs:
runs-on: ubuntu-latest
@ -30,10 +29,22 @@ jobs:
with:
vimdoc: nvim-autopairs
description: A super powerful autopair for Neovim.
- name: clone rules api docs
run: |
git clone --depth 1 https://github.com/windwp/nvim-autopairs.wiki.git ../nvim-autopairs.wiki
cp ../nvim-autopairs.wiki/Rules-API.md ./Rules-API.md
- name: panvimdoc
uses: kdheepak/panvimdoc@v2.7.1
with:
vimdoc: nvim-autopairs-rules
description: nvim-autopairs rules
pandoc: "Rules-API.md"
toc: true
- name: Create PR
run: |
if ! [[ -z $(git status -s) ]]; then
git add doc/nvim-autopairs.txt
git add doc/nvim-autopairs-rules.txt
git commit -m "chore: generated vimdoc"
git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${VIMDOC_BRANCH}
gh pr create --fill --base ${GITHUB_REF#refs/heads/} --head ${VIMDOC_BRANCH} || true

View File

@ -7,7 +7,6 @@ Requires neovim 0.5+
### Setup
``` lua
require('nvim-autopairs').setup{}
```
## Default values