Add a button for purging the website cache

The last thing in the release process still needing Jenkins. Promotion
purges the cache, but the website edits that follow a release happen
afterwards and are all cached, so there has to be a way to purge it on
its own.

No arguments: the verb behind it clears everything, and there is nothing
for a caller to choose.
This commit is contained in:
Dave Page committed 2026-09-21 16:11:13 +01:00
1 parent e1915c7dc0
commit 24a1f24e48
1 file changed
+37
+37
View File
@@ -0,0 +1,37 @@
# Purge the cache in front of the website.
#
# Promotion purges it once, but the website edits that follow a release, the
# downloads being activated, the current version record and the news article,
# all happen afterwards and are all cached. This is the button for that, and
# for the times somebody edits the site outside a release.
#
# It takes no arguments: the verb behind it clears everything, and there is
# nothing for a caller to choose.
name: Purge website cache
on:
workflow_dispatch:
concurrency:
group: 'purge-website-cache'
cancel-in-progress: true
permissions:
contents: read
jobs:
purge:
runs-on: [self-hosted, roadie]
environment: publishing
steps:
- name: Purge
env:
DOWNLOAD: ${{ vars.DOWNLOAD_SSH_TARGET }}
PUBLISH_KEY: ${{ vars.PUBLISH_SSH_KEY || '~/.ssh/roadie-publish' }}
run: |
set -euo pipefail
[ -n "${DOWNLOAD}" ] || { echo "DOWNLOAD_SSH_TARGET is not set." >&2; exit 1; }
ssh -i "${PUBLISH_KEY/#\~/$HOME}" -o BatchMode=yes \
-o StrictHostKeyChecking=yes "${DOWNLOAD}" purge-cache