aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-03-20 15:00:08 -0700
committerMichael Lingelbach <m.j.lbach@gmail.com>2021-03-27 00:50:52 -0700
commit2ffb4c4fd0eaa7c2a6d75b2829c7a439a752b498 (patch)
treeb5a0dd968c07c0c8e84e3bfd390327c3ac0bf72c /.github
parent[docgen] Update CONFIG.md (diff)
downloadnvim-lspconfig-2ffb4c4fd0eaa7c2a6d75b2829c7a439a752b498.tar
nvim-lspconfig-2ffb4c4fd0eaa7c2a6d75b2829c7a439a752b498.tar.gz
nvim-lspconfig-2ffb4c4fd0eaa7c2a6d75b2829c7a439a752b498.tar.bz2
nvim-lspconfig-2ffb4c4fd0eaa7c2a6d75b2829c7a439a752b498.tar.lz
nvim-lspconfig-2ffb4c4fd0eaa7c2a6d75b2829c7a439a752b498.tar.xz
nvim-lspconfig-2ffb4c4fd0eaa7c2a6d75b2829c7a439a752b498.tar.zst
nvim-lspconfig-2ffb4c4fd0eaa7c2a6d75b2829c7a439a752b498.zip
docgen: add vimdoc pipeline with babelfish
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/vimdoc.yml54
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/vimdoc.yml b/.github/workflows/vimdoc.yml
new file mode 100644
index 00000000..8039f234
--- /dev/null
+++ b/.github/workflows/vimdoc.yml
@@ -0,0 +1,54 @@
+name: vimdoc
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ vimdocgen:
+ runs-on: [ubuntu-latest]
+ steps:
+ - uses: actions/checkout@v2
+ - run: date +%F > todays-date
+ - name: Restore cache for today's nightly.
+ uses: actions/cache@v2
+ with:
+ path: build
+ key: ${{ runner.os }}-appimage-${{ hashFiles('todays-date') }}
+
+ - name: Setup neovim nightly and install plugins
+ run: |
+ test -d build || {
+ mkdir -p build
+ wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
+ chmod +x nvim.appimage
+ mv nvim.appimage ./build/nvim
+ }
+ mkdir -p ~/.local/share/nvim/site/pack/vendor/start
+ git clone --depth 1 https://github.com/mjlbach/babelfish.nvim ~/.local/share/nvim/site/pack/vendor/start/babelfish.nvim
+ git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter
+ ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
+
+ - name: Build parser
+ run: |
+ export PACKPATH=$HOME/.local/share/nvim/site
+ ./build/nvim -u ~/.local/share/nvim/site/pack/vendor/start/babelfish.nvim/scripts/init.lua --headless -c 'TSInstallSync markdown' -c 'qa'
+ - name: Generating docs
+ run: |
+ export PATH="${PWD}/build/:${PATH}"
+ export PACKPATH=$HOME/.local/share/nvim/site
+ ./build/nvim -u ~/.local/share/nvim/site/pack/vendor/start/babelfish.nvim/scripts/init.lua --headless -c 'luafile ./scripts/vimdocgen.lua' -c 'qa'
+ - name: Commit changes
+ 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
+ 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})