Realliance pages
Push a branch. Get a website.
Free static hosting for Realliance forge members, like GitHub Pages.
Quick setup
1. Set up your repository
- Sign in at git.realliance.net. Access is invite-only, through Realliance SSO.
- Make a public repo. New repos start private, and Pages only serves public ones for now.
- Pick a name. Your owner name must be a single valid DNS label: no dots or underscores, 63 characters at most.
2. Upload your files
Push your built site to a branch named pages. Run this in the folder that holds your index.html.
git init -b pages
git add -A
git commit -m "publish"
git push -f https://git.realliance.net/<owner>/<repo>.git pages
Your site is live at:
https://<owner>.realliance.page/<repo>/
Want the root of your own address instead? Name the repo pages, and it serves
https://<owner>.realliance.page/. It still uses the pages branch.
This site is the root site of the realliance org.
Publish from CI
Let Forgejo Actions build the site and push it for you. The automatic token is enough, so you need no secret.
Sample workflow: .forgejo/workflows/pages.yml
name: pages
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: ./build.sh # writes the site to ./public
- name: Push to pages
env:
GIT_CONFIG_COUNT: "1"
GIT_CONFIG_KEY_0: http.extraHeader
GIT_CONFIG_VALUE_0: "Authorization: Bearer ${{ github.token }}"
run: |
cd public
git init -q -b pages
git config user.name "pages bot"
git config user.email "pages@users.noreply.git.realliance.net"
git add -A
git commit -q -m "publish ${GITHUB_SHA}"
git push -f "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" pages
A note on the cache
Updates go live within about a minute, often in seconds. Pages caches each site for 60 seconds.
Still seeing the old version? Wait a minute, then hard refresh (Ctrl+Shift+R, or Cmd+Shift+R on a Mac).
That's it
Push to pages again to update. Nothing to configure, no DNS to set up.
Limits
- Public repos only, for now. To publish from a private repo, have its CI push the built site to a separate public repo.
- 128 MB per site. Pages refuses a bigger publish and keeps serving the old version.
- Static files only. Nothing runs on the server, and visitors can only read.
realliance.pageis not on the Public Suffix List yet, so don't rely on cookies.
Custom domains
Not yet. Every site lives at <owner>.realliance.page for now.
Self-hosting
Pages is git-pages behind a small relay that
tells it when a pages branch changes. It runs on the Realliance cluster. The relay's source is
in luma-homeops,
and the runbook is next to it.