Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ jobs:
name: Nimbus Build
needs: pre-build
runs-on: ubuntu-latest
continue-on-error: true
outputs:
succeeded: ${{ steps.build.outputs.succeeded }}
permissions:
Expand Down Expand Up @@ -235,10 +236,12 @@ jobs:
echo "succeeded=true" >> "$GITHUB_OUTPUT"

- name: Upload Nimbus build artifact
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: dist-nimbus
path: dist-nimbus
if-no-files-found: ignore

- name: Upload Nimbus build log
if: always()
Expand All @@ -250,7 +253,7 @@ jobs:

post-build:
name: Post Build
needs: [build, nimbus-build]
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -287,8 +290,8 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: dist-nimbus
path: dist-nimbus
name: dist
path: dist

- name: Tests (Workers)
run: pnpm run test:postbuild
Expand Down Expand Up @@ -362,7 +365,7 @@ jobs:

publish-preview:
name: Deploy Preview
needs: [build, nimbus-build]
needs: build
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -400,8 +403,8 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: dist-nimbus
path: dist-nimbus
name: dist
path: dist

- name: Deploy to Cloudflare Workers
id: deploy
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/publish-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,22 @@ jobs:
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: |
.astro-cache-nimbus/assets
key: astro-nimbus-assets-${{ hashFiles('src/assets/**') }}
.astro-cache/assets
key: astro-assets-${{ hashFiles('src/assets/**') }}
restore-keys: |
astro-nimbus-assets-
astro-assets-

- name: Build
run: pnpm run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_TARGET: nimbus

- name: Upload artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
continue-on-error: true
with:
name: site-html
path: dist-nimbus
path: dist

- name: Deploy to Cloudflare Workers
run: pnpm exec wrangler deploy
Expand Down
5 changes: 1 addition & 4 deletions bin/post-pr-ci-failure-comment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ async function run(): Promise<void> {
(job) =>
job.name === "Pre Build" ||
job.name === "Build" ||
job.name === "Nimbus Build" ||
job.name === "Post Build",
);

if (ciJobs.length === 0) {
core.setFailed(
`Could not find Pre Build, Build, Nimbus Build, or Post Build jobs`,
);
core.setFailed(`Could not find Pre Build, Build, or Post Build jobs`);
process.exit();
}

Expand Down
Binary file modified public/og-docs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/nimbus/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export const collections = {
// non-canonical here and stripped by the (non-strict) zod schema.
"compatibility-flags": defineCollection({
loader: glob({
pattern: "*.{md,mdx}",
pattern: "*.md",
base: "./src/content/compatibility-flags",
}),
schema: compatibilityFlagsSchema,
Expand Down
2 changes: 1 addition & 1 deletion worker/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { WorkerEntrypoint } from "cloudflare:workers";
import { generateRedirectsEvaluator } from "redirects-in-workers";
import redirectsFileContents from "../dist-nimbus/__redirects";
import redirectsFileContents from "../dist/__redirects";

const redirectsEvaluator = generateRedirectsEvaluator(redirectsFileContents, {
maxLineLength: 10_000, // Usually 2_000
Expand Down
4 changes: 3 additions & 1 deletion worker/index.worker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ describe("Cloudflare Docs", () => {
const image = dom.querySelector("meta[property='og:image']")?.attributes
.content;

expect(image).toBe("https://developers.cloudflare.com/og-docs.png");
expect(image).toBe(
"https://developers.cloudflare.com/dev-products-preview.png",
);
});
});

Expand Down
2 changes: 1 addition & 1 deletion wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{ "type": "Text", "globs": ["**/__redirects"], "fallthrough": true },
],
"assets": {
"directory": "./dist-nimbus",
"directory": "./dist",
"binding": "ASSETS",
"not_found_handling": "404-page",
"run_worker_first": true,
Expand Down