Skip to content

Merge pull request #451 from mrjones2014/automation/update-flake-depe… #376

Merge pull request #451 from mrjones2014/automation/update-flake-depe…

Merge pull request #451 from mrjones2014/automation/update-flake-depe… #376

Workflow file for this run

name: Autogenerate doc/legendary.txt
on:
push:
branches: [ master ]
jobs:
gen-docs:
name: Autogenerate doc/legendary.txt
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup git
run: |
git config --local user.email "<>"
git config --local user.name "github-actions[bot]"
printf 'VIMDOC_BRANCH=bot/vimdoc/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: nightly
- name: Checkout ts-vimdoc.nvim
uses: actions/checkout@v3
with:
repository: ibhagwan/ts-vimdoc.nvim
path: vendor/ts-vimdoc.nvim
- name: Checkout nvim-treesitter
uses: actions/checkout@v3
with:
repository: nvim-treesitter/nvim-treesitter
path: vendor/nvim-treesitter
- name: Checkout to vimdoc branch
run: git checkout -b ${VIMDOC_BRANCH}
- name: Generate vimdocs
run: make gen-vimdoc
- name: Create PR
run: |
if ! [[ -z $(git status -s) ]]; then
git add doc/
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
else
echo 'No changes to docs.'
fi