Merge pull request #21 from mcchrish/dev
Copy doc generation workflow from lualine
This commit is contained in:
41
.github/workflows/doc.yml
vendored
41
.github/workflows/doc.yml
vendored
@@ -1,27 +1,29 @@
|
|||||||
# 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]
|
||||||
|
|
||||||
# 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:
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup git
|
||||||
|
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: Checkout to vimdoc branch
|
||||||
|
run: git checkout -b ${VIMDOC_BRANCH}
|
||||||
|
|
||||||
- name: panvimdoc
|
- name: panvimdoc
|
||||||
uses: kdheepak/panvimdoc@v2.7.1
|
uses: kdheepak/panvimdoc@v2.7.1
|
||||||
@@ -31,8 +33,11 @@ jobs:
|
|||||||
pandoc: doc/zenbones.md
|
pandoc: doc/zenbones.md
|
||||||
description: "A collection of contrast-based vim/neovim colorschemes"
|
description: "A collection of contrast-based vim/neovim colorschemes"
|
||||||
version: "Vim v8.1 / Neovim 0.5.0"
|
version: "Vim v8.1 / Neovim 0.5.0"
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
- name: Create PR
|
||||||
with:
|
run: |
|
||||||
commit_message: "auto generate docs"
|
if ! [[ -z $(git status -s) ]]; then
|
||||||
branch: ${{ github.head_ref }}
|
git add doc/zenbones.txt
|
||||||
file_pattern: 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
|
||||||
|
|||||||
@@ -31,11 +31,13 @@ Configuration is only available for neovim. There are two ways to set
|
|||||||
configuration. First:
|
configuration. First:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
|
" vimscript
|
||||||
let g:zenbones_solid_line_nr = v:true
|
let g:zenbones_solid_line_nr = v:true
|
||||||
let g:zenbones_darken_comments = 45
|
let g:zenbones_darken_comments = 45
|
||||||
```
|
```
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
-- lua
|
||||||
vim.g.zenbones_solid_line_nr = true
|
vim.g.zenbones_solid_line_nr = true
|
||||||
vim.g.zenbones_darken_comments = 45
|
vim.g.zenbones_darken_comments = 45
|
||||||
```
|
```
|
||||||
@@ -43,10 +45,12 @@ vim.g.zenbones_darken_comments = 45
|
|||||||
Second way is to set configuration is to assign a dictionary to the prefix:
|
Second way is to set configuration is to assign a dictionary to the prefix:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
|
" vimscript
|
||||||
let g:forestbones = #{ solid_line_nr: v:true, darken_comments: 45 }
|
let g:forestbones = #{ solid_line_nr: v:true, darken_comments: 45 }
|
||||||
```
|
```
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
-- lua
|
||||||
vim.g.forestbones = { solid_line_nr = true, darken_comments = 45 }
|
vim.g.forestbones = { solid_line_nr = true, darken_comments = 45 }
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -54,7 +58,7 @@ vim.g.forestbones = { solid_line_nr = true, darken_comments = 45 }
|
|||||||
the flavor name e.g. `g:rosebones_italic_comments`.
|
the flavor name e.g. `g:rosebones_italic_comments`.
|
||||||
|
|
||||||
| Option | Background | Default | Description |
|
| Option | Background | Default | Description |
|
||||||
| :------------------------ | :--------- | :------ | :------------------------------------------------------------------------------------------ |
|
| ------------------------- | ---------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||||
| lightness | light | `nil` | Change background colors lightness. Options: `'bright'`, `'dim'`. |
|
| lightness | light | `nil` | Change background colors lightness. Options: `'bright'`, `'dim'`. |
|
||||||
| darkness | dark | `nil` | Change background colors darkness. Options: `'stark'`, `'warm'`. |
|
| darkness | dark | `nil` | Change background colors darkness. Options: `'stark'`, `'warm'`. |
|
||||||
| solid_vert_split | both | `false` | Solid \|hl-VertSplit\| background. |
|
| solid_vert_split | both | `false` | Solid \|hl-VertSplit\| background. |
|
||||||
@@ -72,7 +76,7 @@ the flavor name e.g. `g:rosebones_italic_comments`.
|
|||||||
|
|
||||||
#### g:zenbones_compat
|
#### g:zenbones_compat
|
||||||
|
|
||||||
Set to `1` to turn on compatibility mode.
|
Set to `1` to turn on compatibility mode. Turned on in vim.
|
||||||
|
|
||||||
#### lightline
|
#### lightline
|
||||||
|
|
||||||
|
|||||||
@@ -43,12 +43,14 @@ Configuration is only available for neovim. There are two ways to set
|
|||||||
configuration. First:
|
configuration. First:
|
||||||
|
|
||||||
>
|
>
|
||||||
|
" vimscript
|
||||||
let g:zenbones_solid_line_nr = v:true
|
let g:zenbones_solid_line_nr = v:true
|
||||||
let g:zenbones_darken_comments = 45
|
let g:zenbones_darken_comments = 45
|
||||||
<
|
<
|
||||||
|
|
||||||
|
|
||||||
>
|
>
|
||||||
|
-- lua
|
||||||
vim.g.zenbones_solid_line_nr = true
|
vim.g.zenbones_solid_line_nr = true
|
||||||
vim.g.zenbones_darken_comments = 45
|
vim.g.zenbones_darken_comments = 45
|
||||||
<
|
<
|
||||||
@@ -57,11 +59,13 @@ configuration. First:
|
|||||||
Second way is to set configuration is to assign a dictionary to the prefix:
|
Second way is to set configuration is to assign a dictionary to the prefix:
|
||||||
|
|
||||||
>
|
>
|
||||||
|
" vimscript
|
||||||
let g:forestbones = #{ solid_line_nr: v:true, darken_comments: 45 }
|
let g:forestbones = #{ solid_line_nr: v:true, darken_comments: 45 }
|
||||||
<
|
<
|
||||||
|
|
||||||
|
|
||||||
>
|
>
|
||||||
|
-- lua
|
||||||
vim.g.forestbones = { solid_line_nr = true, darken_comments = 45 }
|
vim.g.forestbones = { solid_line_nr = true, darken_comments = 45 }
|
||||||
<
|
<
|
||||||
|
|
||||||
@@ -105,7 +109,7 @@ the flavor name e.g. `g:rosebones_italic_comments`.
|
|||||||
*zenbones-g:zenbones_compat*
|
*zenbones-g:zenbones_compat*
|
||||||
|
|
||||||
g:zenbones_compat Set to `1` to turn on compatibility
|
g:zenbones_compat Set to `1` to turn on compatibility
|
||||||
mode.
|
mode. Turned on in vim.
|
||||||
|
|
||||||
|
|
||||||
*zenbones-lightline*
|
*zenbones-lightline*
|
||||||
|
|||||||
Reference in New Issue
Block a user