From a3436bfcd4e50d45e1dd3790dbb1248dcc261522 Mon Sep 17 00:00:00 2001 From: Charles Gibson <46542971+perasperaactual@users.noreply.github.com> Date: Fri, 10 Apr 2026 11:26:25 -0400 Subject: [PATCH] fix(deploy): enable static export for R2 bucket hosting (#332) Co-authored-by: Stackwright Bot --- .github/workflows/deploy-docs.yml | 13 +------------ examples/stackwright-docs/next.config.js | 6 ++++++ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 6d677c1f..b4b38fcc 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -117,20 +117,9 @@ jobs: run: | rclone sync \ --fast-list \ - --exclude ".next/BUILD_ID" \ - --exclude ".next/cache/**" \ --exclude "node_modules/**" \ --progress \ - examples/stackwright-docs/.next/ \ - "R2:${{ steps.bucket.outputs.bucket }}/" - - - name: Sync public assets to R2 - run: | - rclone copy \ - --fast-list \ - --exclude "node_modules/**" \ - --progress \ - examples/stackwright-docs/public/ \ + examples/stackwright-docs/out/ \ "R2:${{ steps.bucket.outputs.bucket }}/" - name: Deployment summary diff --git a/examples/stackwright-docs/next.config.js b/examples/stackwright-docs/next.config.js index 6bc13d83..0e5f56da 100644 --- a/examples/stackwright-docs/next.config.js +++ b/examples/stackwright-docs/next.config.js @@ -7,4 +7,10 @@ module.exports = createStackwrightNextConfig({ "@stackwright/themes", "@stackwright/types", ], + // Enable static export for R2/CDN hosting + output: 'export', + // Images must be unoptimized for static export + images: { + unoptimized: true, + }, });