ci(docs): serve frozen version archives from R2 (#269)

This commit is contained in:
2026-09-24 15:28:58 -07:00
committed by GitHub
parent 5096ca217b
commit bc73a02623
19 changed files with 651 additions and 835 deletions
+8 -6
View File
@@ -53,15 +53,17 @@ test('main docs deploy exists, serializes deploys, and uses Cloudflare credentia
assert.match(docsPagesWorkflow, /CLOUDFLARE_API_TOKEN/);
assert.match(docsPagesWorkflow, /CLOUDFLARE_ACCOUNT_ID/);
assert.match(docsPagesWorkflow, /CLOUDFLARE_PAGES_PROJECT_NAME/);
assert.match(docsPagesWorkflow, /pages deploy \.tmp\/docs-versioned-site/);
assert.match(docsPagesWorkflow, /pages deploy \.\.\/\.tmp\/docs-versioned-site/);
assert.match(docsPagesWorkflow, /--branch main/);
});
test('docs deploy caches stable archive builds between runs', () => {
assert.match(docsPagesWorkflow, /actions\/cache@v4/);
assert.match(docsPagesWorkflow, /\.tmp\/docs-versioned-archive-cache/);
assert.match(docsPagesWorkflow, /docs-versioned-archives-/);
assert.match(docsPagesWorkflow, /docs-site\/\.vitepress\/\*\*/);
test('docs deploy syncs frozen archives to R2 and ships the archive Pages Function', () => {
assert.doesNotMatch(docsPagesWorkflow, /actions\/cache@/);
assert.match(docsPagesWorkflow, /DOCS_ARCHIVE_R2_ACCESS_KEY_ID/);
assert.match(docsPagesWorkflow, /DOCS_ARCHIVE_R2_SECRET_ACCESS_KEY/);
assert.match(docsPagesWorkflow, /--require-archives/);
assert.match(docsPagesWorkflow, /--rebuild-archives=\$\{REBUILD_ARCHIVES\}/);
assert.match(docsPagesWorkflow, /workingDirectory: docs-site/);
});
test('docs deploy skips invalid release tags without failing the workflow', () => {
+1 -1
View File
@@ -72,7 +72,7 @@ test('stable release tags publish docs and prereleases do not update stable docs
assert.match(docsPagesWorkflow, /tags:\s*\n\s*-\s*'v\*'/);
assert.match(docsPagesWorkflow, /github\.ref_name/);
assert.match(docsPagesWorkflow, /\^v\[0-9\]\+\\\.\[0-9\]\+\\\.\[0-9\]\+\$/);
assert.match(docsPagesWorkflow, /bun run docs:build:versioned/);
assert.match(docsPagesWorkflow, /bun run scripts\/build-versioned-docs\.ts/);
assert.doesNotMatch(docsPagesWorkflow, /beta/);
});