| workflow_id | archive_sync | ||
|---|---|---|---|
| workflow_kind | stage | ||
| stage_binding | archive_sync | ||
| stability | canonical | ||
| workflow_group | release | ||
| runner_mode | scripted | ||
| launch_mode | local_mutation | ||
| default_skill | substack-archive-sync | ||
| launch_templates |
|
||
| required_context |
|
||
| expected_outputs |
|
||
| done_when |
|
||
| approval_gate | none |
This is the tracked canonical workflow for refreshing the public Substack archive, validating the Eleventy mirror, and handling the manual-import fallback when sync is blocked.
Use this workflow before dropping into the repo scripts or the substack-archive-sync skill bundle.
- Treat
npm run sync:substackandscripts/sync_substack_archive.pyas the canonical refresh path. - After any archive mutation, validate both the normal mirror and the
/content/prefixed GitHub Pages mode. - If feed discovery or CI is blocked by a
403, use the manual-import fallback instead of creating duplicate shadow entries. - Manual imports must keep the canonical slug-based filename pattern so later sync runs overwrite them cleanly.
- The repo converged on monthly scheduled sync plus manual dispatch, not aggressive automatic polling.
Normal entrypoint:
npm run sync:substackLower-level script with a machine-readable summary:
.venv/bin/python scripts/sync_substack_archive.py \
--summary-path /tmp/substack-sync-summary.jsonBuild and validate the normal mirror:
npm run build:mirror
npm run check:mirrorValidate the GitHub Pages subpath mode explicitly:
ELEVENTY_PATH_PREFIX=/content/ MIRROR_SITE_URL=https://petroslamb.github.io npm run check:mirrorUse manual import when the feed or workflow path is blocked and a tracked archive entry still needs to be added or repaired.
Required artifacts per post:
publication_strategy_and_archive/substack_archive/YYYY-MM-DD_<slug>.mdpublication_strategy_and_archive/substack_archive/YYYY-MM-DD_<slug>.html- localized assets under
publication_strategy_and_archive/substack_archive/assets/ - a
metadata.jsonentry with:slug,title,url,post_date,audience,fetched_at,content_hash,md_path,html_path,hero_image,mirror_enabled
After a manual import, rerun the mirror validation path.
- If CI behavior looks wrong before jobs even start, inspect workflow YAML syntax before debugging archive code.
- Treat
scripts/check_mirror.pyandscripts/e2e_mirror_smoke.pyas required validation, not optional extras. - Do not spend routine archive time untangling unrelated environment dependency conflicts if the working repo environment already runs the canonical scripts.
../../publication_strategy_and_archive/README.md: archive system orientation and public mirror context.../../scripts/README.md: tracked script map for refresh, validation, and smoke tests.../skills/substack-archive-sync/: execution-focused skill bundle.