Improvements and corrections for git-pages docs

Suggested by whitequark
This commit is contained in:
Daphne Preston-Kendal 2026-02-12 22:10:08 +01:00
parent 48e83c0c6c
commit 5168b2f92b
2 changed files with 7 additions and 4 deletions

View file

@ -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:

View file

@ -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: