aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorAshkan Kiani <ashkan.k.kiani@gmail.com>2019-11-14 15:20:31 -0800
committerGitHub <noreply@github.com>2019-11-14 15:20:31 -0800
commitec406e17fd86c321b084d877f66bc5f0280ed5c0 (patch)
treed15b5bd511ceef537841a2e300b9602c194882a8 /.github
parentSmall edits to readme (#4) (diff)
downloadnvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.gz
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.bz2
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.lz
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.xz
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.tar.zst
nvim-lspconfig-ec406e17fd86c321b084d877f66bc5f0280ed5c0.zip
Add github actions for docgen (#7)
* Create main.yml * Update CONTRIBUTING and REAMDE. Explain that Github Actions generate README.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/main.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 00000000..f7f01349
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,34 @@
+name: CI
+
+on: [push]
+
+jobs:
+ docgen:
+ runs-on: [ubuntu-latest]
+ if: github.ref != 'master'
+ steps:
+ - uses: actions/checkout@v1
+ - run: date +%F > todays-date
+ - name: Restore cache for today's nightly.
+ uses: actions/cache@v1.0.0
+ with:
+ path: _neovim
+ key: ${{ runner.os }}-nightly-${{ hashFiles('todays-date') }}
+ - name: Setup from neovim nightly and run docgen
+ run: |
+ curl -OL https://raw.githubusercontent.com/norcalli/bot-ci/master/scripts/github-actions-setup.sh
+ source github-actions-setup.sh nightly-x64
+ nvim -u NONE +'set rtp+=$PWD' +"luafile scripts/docgen.lua" +q
+ - 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})