Action to deploy static assets to Forge Pages (https://code.leon.wtf/leon/Forge-Pages)
Find a file
2025-11-29 22:24:43 +01:00
action.yml fix: wrong bracket lol 2025-11-29 22:24:43 +01:00
README.md fix: typo 2025-11-28 19:47:10 +01:00

Forge Pages Action

Action to deploy static content to a Forge Pages server.

Usage

...
steps:
  - uses: actions/checkout@v4
  # e.g. build a website to ./dist
  - name: Deploy to Forge Pages
    uses: https://code.leon.wtf/leon/Forge-Pages-Action@v1
    with:
      content: ./dist
      to_host: https://pages.example.com
      protect: true

Parameters:

  • content: Base path of your static content
  • to_host: Base URL of you Forge Pages server
  • protect: If set to true, the page will be protected by a Forgejo login. It can then only be viewed by users that have at least read permissions on the corresponding repository this page was deployed from.

The page will be deployed to http[s]://<repo-owner>.<forge-pages-server-base-url>/<repo-name>/*. This information is pulled from ${{ env.GITHUB_REPOSITORY }}.

Additionally, the action will read the workflow token from the environment (${{ env.GITHUB_TOKEN }}) to ensure that the repository has permissions to deploy to the URL. The workflow token always has permissions to write to the current repository, so if you have permissions to invoke or change a workflow, than this will succeed. This check is to ensure that pages cannot be overwritten by another repositories workflow.