this is a repo meant to test forgejo-actions https://jackwaterloo.pages.jackwaterloo.com/test-actions
  • Shell 77.1%
  • HTML 22.9%
Find a file
Jack Waterloo 664e166293
All checks were successful
Publish to Git Pages / publish (push) Successful in 7s
Forgejo Actions Demo / Explore-Forgejo-Actions (push) Successful in 3s
Add example configuration for git-pages
2026-03-23 19:06:50 -05:00
.forgejo/workflows added variable to workflow 2026-03-13 20:18:55 -05:00
docs added http redirect 2026-03-14 11:13:15 -05:00
git-pages Add example configuration for git-pages 2026-03-23 19:06:50 -05:00
public added docs and removed some info 2026-03-12 21:43:17 -05:00
scripts added docs and removed some info 2026-03-12 21:43:17 -05:00
.gitignore added .gitignore 2026-03-11 21:43:16 -05:00
example.txt Add initial files: example.txt and Forgejo Actions workflow 2026-02-16 12:55:44 -06:00
README.md Update README.md to include details about the headers-more module installation script and its purpose 2026-03-19 17:15:39 -05:00

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/ (from public/ and/or index.html).
    • Publishes _site/ using actions/git-pages@v2.

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

  1. In Forgejo, set repository or organization variable:
    • PAGES = your Git Pages domain (example: pages.example.com)
  2. Ensure the workflow has access to:
    • forge.token for actions/git-pages@v2 authentication
  3. Push changes to the main branch to trigger deployment.

Site content behavior

During deployment, the workflow prepares _site/ like this:

  • Copies everything from public/ if it exists.
  • Copies root index.html if it exists.

So you can deploy by adding either:

  • a public/ folder with static files, or
  • a root index.html file.

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 Server value 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.