Skip to content

Commit

Permalink
ci: auto update readme conf snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
Robitx committed Jul 22, 2024
1 parent 25ef1e5 commit 79889a4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,24 @@ on:
push:
pull_request:
workflow_dispatch:

jobs:
docs:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docs' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Update README with Snippet Permalink
uses: Robitx/snippet-permalink-updater-action@v1
with:
snippet_file: 'lua/gp/config.lua'
start_marker: 'README_REFERENCE_MARKER_START'
end_marker: 'README_REFERENCE_MARKER_END'
markdown_file: 'README.md'
replace_marker: '<!-- README_REFERENCE_MARKER_REPLACE_NEXT_LINE -->'

- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
Expand All @@ -20,10 +31,11 @@ jobs:
docmapping: true
docmappingprojectname: false
dedupsubheadings: false

- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: auto-generate vimdoc"
commit_message: "chore: update README and auto-generate vimdoc"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ Voice commands (`:GpWhisper*`) depend on `SoX` (Sound eXchange) to handle audio

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.

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

# Usage
Expand Down
2 changes: 2 additions & 0 deletions lua/gp/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
-- Default config
--------------------------------------------------------------------------------

-- README_REFERENCE_MARKER_START
local config = {
-- Please start with minimal config possible.
-- Just openai_api_key if you don't have OPENAI_API_KEY env set up.
Expand Down Expand Up @@ -562,5 +563,6 @@ local config = {
-- end,
},
}
-- README_REFERENCE_MARKER_END

return config

0 comments on commit 79889a4

Please sign in to comment.