From 5168b2f92b2366c51e8081b7969d3f062091124a Mon Sep 17 00:00:00 2001 From: Daphne Preston-Kendal Date: Thu, 12 Feb 2026 22:10:08 +0100 Subject: [PATCH] Improvements and corrections for git-pages docs Suggested by whitequark --- content/codeberg-pages/forgejo-actions.md | 6 +++--- content/codeberg-pages/index.md | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/content/codeberg-pages/forgejo-actions.md b/content/codeberg-pages/forgejo-actions.md index cb4a6da..fceb7c6 100644 --- a/content/codeberg-pages/forgejo-actions.md +++ b/content/codeberg-pages/forgejo-actions.md @@ -25,14 +25,14 @@ To use it, simply add it as a final step to your workflow: ```yaml - uses: https://codeberg.org/git-pages/action@v2 with: - site: https://username.codeberg.page/repository-name/ + site: "https://${{ forge.repository_owner }}.codeberg.page/repository-name/" token: ${{ forge.token }} source: _site/ ``` {% endraw %} -Replace `username` in the `site` parameter with your Codeberg username or organization name, and `repository-name` with the name of your repository. +Replace `repository-name` in the `site` parameter with the name of your repository. If your repository is also called `pages`, you can also omit the repository name and deploy directly to the site `https://username.codeberg.page/`. The `source` parameter should point to the directory (relative to the root, after all previous steps in your workflow) where your site generator has put the generated version of your site. @@ -42,7 +42,7 @@ The `token` will automatically be filled by Forgejo Actions with a secret token, {% admonition "Warning" %} -If you accept pull requests on your repository, or use branches to test out new features, write draft blog posts, etc., you should either limit the whole workflow, or this step only, to pushes to a default branch (usually `main` or `master`) to ensure that only finalized content is published to your site. +If you use branches to test out new features, write draft blog posts, etc., you should either limit the whole workflow, or this step only, to pushes to a default branch (usually `main` or `master`) to ensure that only finalized content is published to your site. To do this, either add a [`on.push.branches` list](https://forgejo.org/docs/next/user/actions/reference/#onpush) to the whole workflow, or add [an `if` condition to the step](https://forgejo.org/docs/next/user/actions/reference/#jobsjob_idstepsif-1) (or [to the whole job](https://forgejo.org/docs/next/user/actions/reference/#jobsjob_idif)) like this: diff --git a/content/codeberg-pages/index.md b/content/codeberg-pages/index.md index 35a0992..4dd54c1 100644 --- a/content/codeberg-pages/index.md +++ b/content/codeberg-pages/index.md @@ -24,7 +24,10 @@ The new documentation is work in progress, and we appreciate your feedback. Plea Codeberg Pages allows you to easily publish static websites with a human-friendly address (`{username}.codeberg.page`) or your custom domain on Codeberg. You can publish an website for your user or organization, as well as websites for each repository. -Codeberg Pages are served using a deployment of [git-pages](https://git-pages.org/), which itself is [developed on Codeberg](https://codeberg.org/git-pages/git-pages). It is free/libre open source software. +Codeberg Pages are served using a deployment of [git-pages](https://git-pages.org/), which itself is [developed on Codeberg](https://codeberg.org/git-pages/git-pages). +It is free/libre open source software. +Git-pages works with any Forgejo host out there, as well as many other Git forges. +If you are running your own forge, you can also run it yourself and help with the development. See also: