ci: replace docgen push with staleness check

Problem: the docgen workflow pushed directly to main, which is blocked
by repository rulesets. No token-based push from GitHub Actions can
bypass ruleset rules on personal repos.

Solution: replace the push step with a git diff --exit-code check that
fails if generated docs are out of date. Docs must now be committed by
the developer via make doc. Also regenerates docs to reflect batch 4
changes (close_float, OilFileIcon, OilExecutableHidden, recipe link).
This commit is contained in:
Barrett Ruth 2026-02-20 21:16:17 -05:00
parent 181e735c3b
commit bb128e96af
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 19 additions and 19 deletions

View file

@ -84,20 +84,9 @@ jobs:
run: | run: |
python -m pip install pyparsing==3.0.9 python -m pip install pyparsing==3.0.9
make doc make doc
- name: Commit changes - name: Check docs are up to date
if: ${{ github.ref == 'refs/heads/main' }}
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN || secrets.GITHUB_TOKEN }}
COMMIT_MSG: |
[docgen] Update docs
skip-checks: true
run: | run: |
git config user.email "actions@github" git diff --exit-code README.md doc
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git add README.md doc
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})
release: release:
name: release name: release

View file

@ -240,6 +240,8 @@ require("oil").setup({
return nil return nil
end, end,
}, },
new_file_mode = 420,
new_dir_mode = 493,
-- Extra arguments to pass to SCP when moving/copying files over SSH -- Extra arguments to pass to SCP when moving/copying files over SSH
extra_scp_args = {}, extra_scp_args = {},
-- Extra arguments to pass to aws s3 when creating/deleting/moving/copying files using aws s3 -- Extra arguments to pass to aws s3 when creating/deleting/moving/copying files using aws s3
@ -374,6 +376,7 @@ Note that older versions of Neovim don't support numbers in the url, so for Neov
- [Hide gitignored files and show git tracked hidden files](doc/recipes.md#hide-gitignored-files-and-show-git-tracked-hidden-files) - [Hide gitignored files and show git tracked hidden files](doc/recipes.md#hide-gitignored-files-and-show-git-tracked-hidden-files)
- [Open Telescope file finder in the current oil directory](doc/recipes.md#open-telescope-file-finder-in-the-current-oil-directory) - [Open Telescope file finder in the current oil directory](doc/recipes.md#open-telescope-file-finder-in-the-current-oil-directory)
- [Add custom column for file extension](doc/recipes.md#add-custom-column-for-file-extension) - [Add custom column for file extension](doc/recipes.md#add-custom-column-for-file-extension)
- [Disable dimming of hidden files](doc/recipes.md#disable-dimming-of-hidden-files)
## Third-party extensions ## Third-party extensions

View file

@ -122,9 +122,7 @@ CONFIG *oil-confi
return nil return nil
end, end,
}, },
-- Permission mode for new files (default 420 = 0644)
new_file_mode = 420, new_file_mode = 420,
-- Permission mode for new directories (default 493 = 0755)
new_dir_mode = 493, new_dir_mode = 493,
-- Extra arguments to pass to SCP when moving/copying files over SSH -- Extra arguments to pass to SCP when moving/copying files over SSH
extra_scp_args = {}, extra_scp_args = {},
@ -442,10 +440,8 @@ icon *column-ico
{directory} `string` Icon for directories {directory} `string` Icon for directories
{add_padding} `boolean` Set to false to remove the extra whitespace after {add_padding} `boolean` Set to false to remove the extra whitespace after
the icon the icon
{use_slow_filetype_detection} `boolean` Set to true to detect filetypes {use_slow_filetype_detection} `boolean` Set to true to detect filetypes by
by reading the first lines of each file (e.g. shebangs). reading the first lines of each file (e.g. shebangs).
This improves icon accuracy for extensionless scripts but
performs synchronous I/O per file per render.
size *column-size* size *column-size*
Adapters: files, ssh, s3 Adapters: files, ssh, s3
@ -575,6 +571,12 @@ close *actions.clos
Parameters: Parameters:
{exit_if_last_buf} `boolean` Exit vim if oil is closed as the last buffer {exit_if_last_buf} `boolean` Exit vim if oil is closed as the last buffer
close_float *actions.close_float*
Close oil if the window is floating, otherwise do nothing
Parameters:
{exit_if_last_buf} `boolean` Exit vim if oil is closed as the last buffer
copy_to_system_clipboard *actions.copy_to_system_clipboard* copy_to_system_clipboard *actions.copy_to_system_clipboard*
Copy the entry under the cursor to the system clipboard Copy the entry under the cursor to the system clipboard
@ -691,6 +693,9 @@ OilDirHidden *hl-OilDirHidde
OilDirIcon *hl-OilDirIcon* OilDirIcon *hl-OilDirIcon*
Icon for directories Icon for directories
OilFileIcon *hl-OilFileIcon*
Icon for files
OilSocket *hl-OilSocket* OilSocket *hl-OilSocket*
Socket files in an oil buffer Socket files in an oil buffer
@ -730,6 +735,9 @@ OilFileHidden *hl-OilFileHidde
OilExecutable *hl-OilExecutable* OilExecutable *hl-OilExecutable*
Executable files in an oil buffer Executable files in an oil buffer
OilExecutableHidden *hl-OilExecutableHidden*
Hidden executable files in an oil buffer
OilCreate *hl-OilCreate* OilCreate *hl-OilCreate*
Create action in the oil preview window Create action in the oil preview window