Skip to content

Commit 79889a4

Browse files
committed
ci: auto update readme conf snippet
1 parent 25ef1e5 commit 79889a4

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/docgen.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,24 @@ on:
33
push:
44
pull_request:
55
workflow_dispatch:
6-
76
jobs:
87
docs:
98
runs-on: ubuntu-latest
109
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docs' }}
1110
steps:
1211
- uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Update README with Snippet Permalink
16+
uses: Robitx/snippet-permalink-updater-action@v1
17+
with:
18+
snippet_file: 'lua/gp/config.lua'
19+
start_marker: 'README_REFERENCE_MARKER_START'
20+
end_marker: 'README_REFERENCE_MARKER_END'
21+
markdown_file: 'README.md'
22+
replace_marker: '<!-- README_REFERENCE_MARKER_REPLACE_NEXT_LINE -->'
23+
1324
- name: panvimdoc
1425
uses: kdheepak/panvimdoc@main
1526
with:
@@ -20,10 +31,11 @@ jobs:
2031
docmapping: true
2132
docmappingprojectname: false
2233
dedupsubheadings: false
34+
2335
- name: Push changes
2436
uses: stefanzweifel/git-auto-commit-action@v4
2537
with:
26-
commit_message: "chore: auto-generate vimdoc"
38+
commit_message: "chore: update README and auto-generate vimdoc"
2739
commit_user_name: "github-actions[bot]"
2840
commit_user_email: "github-actions[bot]@users.noreply.github.com"
2941
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ Voice commands (`:GpWhisper*`) depend on `SoX` (Sound eXchange) to handle audio
209209

210210
Below is a linked snippet with the default values, but I suggest starting with minimal config possible (just `openai_api_key` if you don't have `OPENAI_API_KEY` env set up). Defaults change over time to improve things, options might get deprecated and so on - it's better to change only things where the default doesn't fit your needs.
211211

212+
<!-- README_REFERENCE_MARKER_REPLACE_NEXT_LINE -->
212213
https://github.com/Robitx/gp.nvim/blob/3adf3dc7589f54cf7af887879c995aa9846aace5/lua/gp/config.lua#L8-L568
213214

214215
# Usage

lua/gp/config.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
-- Default config
66
--------------------------------------------------------------------------------
77

8+
-- README_REFERENCE_MARKER_START
89
local config = {
910
-- Please start with minimal config possible.
1011
-- Just openai_api_key if you don't have OPENAI_API_KEY env set up.
@@ -562,5 +563,6 @@ local config = {
562563
-- end,
563564
},
564565
}
566+
-- README_REFERENCE_MARKER_END
565567

566568
return config

0 commit comments

Comments
 (0)