Files
JIANT/.github/workflows/site-backup.yml
T
Claude 3caf284dbc [private-preview] Recover the published site from the live site when the Pages artifact expired
tools/fetch_live_site.py rebuilds the site every publish starts from when the
previous deploy's github-pages artifact is gone (they expire after one day):
exactly the files of the live site's site-manifest.json, each checked against
its SHA-256, or, while the live site has no manifest, a crawl (the generators'
outputs, versions.json and SHA256SUMS of both channels, every same-site link,
the manual's screens, candidates from scripts and from this checkout). It
stops instead of handing over a partial site: a required or listed file
missing, any answer other than 200/404, a package that does not match
SHA256SUMS, an installer that does not offer what versions.json lists, too
few files. Dry run, manifest and verify commands; tests with a local server.

site-backup.yml keeps a checked copy of the live site as an ordinary artifact
(90 days) and deploys nothing.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
2026-11-11 22:25:16 +00:00

37 lines
1.3 KiB
YAML

# SPDX-License-Identifier: GPL-3.0-only
# Copyright (C) 2026 Juan Ignacio Antonucci (Juan Jiant)
# A copy of the live site (https://juanjiant-bit.github.io/JIANT/) as an ordinary artifact, kept 90 days: every file
# tools/fetch_live_site.py finds, checked, with the full list in the log. It deploys nothing. Run it before a publish
# that has to start from the live site (the previous deploy's Pages artifact expired) to see what would be recovered.
name: Back up the live site
on:
workflow_dispatch:
push:
branches: [main]
paths: [.github/workflows/site-backup.yml]
permissions:
contents: read
jobs:
backup:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: The recovery tool's own tests
run: python3 tests/test_fetch_live_site.py
- name: Fetch and check the live site
run: |
set -o pipefail
mkdir -p build
python3 tools/fetch_live_site.py fetch --out build/live-site --tar build/live-site.tar | tee build/live-site.log
- uses: actions/upload-artifact@v4
if: always()
with:
name: live-site-backup
path: |
build/live-site.tar
build/live-site.log
retention-days: 90