docs: copy lualine workflow
This commit is contained in:
61
.github/workflows/doc.yml
vendored
61
.github/workflows/doc.yml
vendored
@@ -1,38 +1,37 @@
|
|||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
|
|
||||||
name: doc
|
name: doc
|
||||||
|
|
||||||
# Controls when the workflow will run
|
|
||||||
on:
|
on:
|
||||||
# Triggers the workflow on push or pull request events but only for the main branch
|
push:
|
||||||
push:
|
branches: [main, dev]
|
||||||
branches: [ main, dev ]
|
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
jobs:
|
||||||
# This workflow contains a single job called "build"
|
vimdocgen:
|
||||||
vimdocgen:
|
runs-on: ubuntu-latest
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
steps:
|
||||||
steps:
|
- uses: actions/checkout@v2
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
- name: Setup git
|
||||||
- uses: actions/checkout@v2
|
run: |
|
||||||
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --local user.name "github-actions[bot]"
|
||||||
|
printf 'VIMDOC_BRANCH=bot/vimdoc/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: panvimdoc
|
- name: Checkout to vimdoc branch
|
||||||
uses: kdheepak/panvimdoc@v2.7.1
|
run: git checkout -b ${VIMDOC_BRANCH}
|
||||||
with:
|
|
||||||
# Output vimdoc project name
|
- name: panvimdoc
|
||||||
vimdoc: zenbones
|
uses: kdheepak/panvimdoc@v2.7.1
|
||||||
pandoc: doc/zenbones.md
|
with:
|
||||||
description: "A collection of contrast-based vim/neovim colorschemes"
|
# Output vimdoc project name
|
||||||
version: "Vim v8.1 / Neovim 0.5.0"
|
vimdoc: zenbones
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
pandoc: doc/zenbones.md
|
||||||
with:
|
description: "A collection of contrast-based vim/neovim colorschemes"
|
||||||
commit_message: "auto generate docs"
|
version: "Vim v8.1 / Neovim 0.5.0"
|
||||||
branch: ${{ github.head_ref }}
|
- name: Create PR
|
||||||
file_pattern: doc/zenbones.txt
|
run: |
|
||||||
|
if ! [[ -z $(git status -s) ]]; then
|
||||||
|
git add doc/zenbones.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
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user