- Shell 77.1%
- HTML 22.9%
| .forgejo/workflows | ||
| docs | ||
| git-pages | ||
| public | ||
| scripts | ||
| .gitignore | ||
| example.txt | ||
| README.md | ||
test-actions
This repository is meant to test Forgejo Actions workflows, including a basic CI-style workflow and a Git Pages publish workflow.
Actions explanation
This repo contains two Forgejo Actions workflows in .forgejo/workflows/:
-
test.yaml- Runs on every push.
- Prints context details (event, OS, repo) and verifies command execution on the runner.
- Useful as a simple smoke test to confirm runner registration and workflow execution.
-
pages.yaml- Runs on pushes to
main. - Collects static content into
_site/(frompublic/and/orindex.html). - Publishes
_site/usingactions/git-pages@v2.
- Runs on pushes to
Git Pages explanation and deployment
The publish workflow uses this URL pattern:
https://<user>.<PAGES_DOMAIN>/<repo>/
In this repository, the workflow builds that URL as:
https://${{ github.actor }}.${{ vars.PAGES }}/${{ github.event.repository.name }}/
Required Forgejo configuration
- In Forgejo, set repository or organization variable:
PAGES= your Git Pages domain (example:pages.example.com)
- Ensure the workflow has access to:
forge.tokenforactions/git-pages@v2authentication
- Push changes to the
mainbranch to trigger deployment.
Site content behavior
During deployment, the workflow prepares _site/ like this:
- Copies everything from
public/if it exists. - Copies root
index.htmlif it exists.
So you can deploy by adding either:
- a
public/folder with static files, or - a root
index.htmlfile.
Reverse proxy notes (nginx)
If Git Pages runs behind nginx, the Server header must be preserved for the git-pages tooling to recognize the backend correctly.
See docs/nginx-git-pages.conf for a working reverse proxy snippet that:
- forwards traffic to the Git Pages backend, and
- rewrites response headers so the backend
Servervalue is passed through.
Why the headers-more install script exists
The nginx config relies on the headers-more module to control the Server header. I could not find a suitable free package repository that provided this module in a way I could install with dnf, so I built it from source. More specifically I had AI create the install script for me using directions from the headers more repo.
Use scripts/install-headers-more-nginx-module.sh to automate that source build/install flow.