No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-21 22:56:33 -07:00
notify Add shared publish/notify composite actions for pages deploys 2026-07-16 11:52:44 -07:00
publish feat(publish): use incrementing pages-vN release tags instead of rolling pages-latest 2026-07-21 22:46:06 -07:00
README.md Add shared publish/notify composite actions for pages deploys 2026-07-16 11:52:44 -07:00

pages-actions

Shared Forgejo composite Actions for repos deploying to pages.lpfaint992.duckdns.org via the pages-webhook service. Extracted out of the near-identical publish/notify steps that had drifted across dwm2-dex, dwm2-workbench, dwm1-disasm, dwm2-disasm, and dwm2-save-file's own workflow files.

Reusable composite actions, not workflow_call reusable workflows -- composite actions are the more mature/reliable mechanism on this instance's runner version, and only need uses: at the step level.

publish/

Tars a staged site directory and publishes it as a rolling pages-latest Forgejo release+asset for pages-webhook to pick up.

- name: Stage pages output
  run: |
    mkdir -p _pages_out
    cp -r dist/. _pages_out/

- name: Publish to pages
  uses: dqm/pages-actions/publish@main
  with:
    dist-dir: _pages_out
    token: ${{ secrets.GITHUB_TOKEN }}
    # optional -- stamps a "pages" commit status pointing here
    public-url: https://pages.lpfaint992.duckdns.org/${{ github.event.repository.name }}/

notify/

Posts a build-result notification to ntfy. Call it as its own step with if: always() so it still fires when an earlier step (build, publish) failed -- bundling it into publish/ would mean a failed build never gets reported.

- name: Notify
  if: always()
  uses: dqm/pages-actions/notify@main
  with:
    ntfy-token: ${{ secrets.NTFY_TOKEN }}

Enabling pages for a new repo

No central config edit needed. Two self-service steps:

  1. Add the pages topic to the repo (Settings -> repo topics, or PUT /api/v1/repos/<owner>/<repo>/topics/pages) -- this is what pages-webhook checks before it will deploy anything for a repo.
  2. Add a publish step (above) to a workflow that runs on push to main.

The Forgejo system webhook pointed at pages-webhook (release events) is instance-wide and already fires for every repo -- see ~/docker/pages-webhook/README for how that's configured. Nothing per-repo to register there anymore.