GitHub Actions workflows for this repository. The repo is hosted on GitHub,
GitLab (.gitlab-ci.yml), and a self-hosted Gitea instance, so the
forge-specific logic is kept thin and the real work lives in reusable scripts
under .ci_bin/.
Note
A Gitea Actions runner also scans .github/workflows, so these files run on
Gitea too unless explicitly scoped. See Multi-forge notes.
| File | Trigger | Purpose |
|---|---|---|
deploy-pages.yml |
push/PR to main (doc paths) |
Build the static docs site and deploy it to GitHub Pages. |
package-vim.yml |
push/PR to main (Vim paths) |
Package .vim/.vimrc into a vim.tar.gz artifact. |
release.yml |
push tag v* |
Publish a release whose notes are extracted from CHANGELOG.md. |
Installs markdown and runs .ci_bin/build_pages.sh,
which renders README.md, CHANGELOG.md, and dist/arch/install.md into
public/ via gen_pages.py. The artifact is
uploaded on every run; deployment only happens on main.
The page list lives only in build_pages.sh — the same script backs the
local post-commit preview hook (see .pre-commit-config.yaml) and the GitLab
pages job, so all three stay in sync.
Checks out submodules recursively and tars the Vim configuration into a
vim-package artifact.
On a v* tag it:
- runs
.ci_bin/extract_release_notes.shto pull that version's section out ofCHANGELOG.md; - creates the release via the REST API
(
POST $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases) usingjq+curl.
The API call is forge-agnostic: GitHub and Gitea expose the same release
endpoint and both inject GITHUB_API_URL, GITHUB_REPOSITORY, and
secrets.GITHUB_TOKEN, so this one workflow publishes releases on either forge.
Important
The release notes are read from CHANGELOG.md at the tagged commit.
Make sure the ## [vX.Y.Z] section exists before pushing the tag, otherwise
the release gets a "No specific notes found" placeholder.
| Script | Used by |
|---|---|
build_pages.sh |
deploy-pages.yml, GitLab pages, local post-commit hook |
extract_release_notes.sh |
release.yml, GitLab create_release |
gen_pages.py |
build_pages.sh |
Both shell scripts are POSIX sh (no Bash-isms) so they run on minimal CI
images such as the GitLab alpine job.
No custom secrets or variables need to be configured — every token used is provided automatically by the runner.
| Name | Used by | Source | Manual setup |
|---|---|---|---|
GITHUB_TOKEN |
release.yml |
Auto-injected by GitHub Actions and the Gitea runner | None |
OIDC token (id-token: write) |
deploy-pages.yml |
Auto-issued by GitHub for Pages | None |
Note
release.yml declares permissions: contents: write so the automatic token
is allowed to create releases — this lives in the workflow, not in repo
settings.
One-time setup prerequisites (not variables):
- GitHub Pages must be enabled for
deploy-pages.yml: Settings → Pages → Build and deployment → Source: GitHub Actions. The job deploys to thegithub-pagesenvironment. - Gitea: Actions must be enabled for the repo. The runner injects
GITHUB_TOKENautomatically with write access to the current repo (enough to create releases) — no secret to add.
Because Gitea's runner also picks up .github/workflows:
-
release.ymlis intentionally forge-agnostic and runs on both GitHub and Gitea. -
deploy-pages.ymlandpackage-vim.ymlare GitHub-specific (GitHub Pages / artifact upload), so each job is guarded with:if: ${{ github.server_url == 'https://github.com' }}
On Gitea
github.server_urlis the instance URL, so those jobs skip; on GitHub they run as normal.