mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-18 01:39:00 +00:00
feat(CI): auto-update README.md
This commit is contained in:
committed by
Thomas Vigouroux
parent
ac13baadb6
commit
ffe7d96dfd
22
.github/workflows/update-readme.yml
vendored
22
.github/workflows/update-readme.yml
vendored
@@ -1,11 +1,12 @@
|
||||
name: Check README parser info
|
||||
|
||||
on: [push, pull_request]
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
luacheck:
|
||||
update-readme:
|
||||
name: Check README parser info
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref != 'master'
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
@@ -18,8 +19,17 @@ jobs:
|
||||
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
|
||||
- name: Compile parsers
|
||||
run: ./nvim.appimage --headless -c "TSInstallSync all" -c "q"
|
||||
|
||||
# inspired by nvim-lspconfigs
|
||||
- name: Check README
|
||||
run: ./nvim.appimage --headless -c "luafile ./scripts/update-readme.lua" -c "q"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
COMMIT_MSG: |
|
||||
[docgen] Update README.md
|
||||
skip-checks: true
|
||||
run: |
|
||||
git config user.email "actions@github"
|
||||
git config user.name "Github Actions"
|
||||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
||||
./nvim.appimage --headless -c "luafile ./scripts/update-readme.lua" -c "q" || git add README.md
|
||||
# Only commit and push if we have changes
|
||||
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})
|
||||
|
||||
Reference in New Issue
Block a user