| Filename | Latest commit message | Latest commit date |
|---|---|---|
| notify | ||
| publish | ||
| README.md | ||
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:
- Add the
pagestopic to the repo (Settings -> repo topics, orPUT /api/v1/repos/<owner>/<repo>/topics/pages) -- this is whatpages-webhookchecks before it will deploy anything for a repo. - Add a
publishstep (above) to a workflow that runs on push tomain.
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.