Skip to content

Commit

Permalink
fix nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Oct 12, 2024
1 parent 672b56a commit 4ca4a78
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/deploy-docs-bundle-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ jobs:
filePath: preview.txt
comment_tag: pr_preview

analyze:
needs: ignore
if: needs.ignore.outputs.continue == 1
runs-on: ubuntu-latest
permissions: write-all # required for the pr-preview comment
steps:
# set the ref to a specific branch so that the deployment is scoped to that branch (instead of a headless ref)
- uses: actions/checkout@v4
with:
fetch-depth: 2 # used for turbo-ignore
ref: ${{ github.event.pull_request.head.ref || github.ref_name || github.ref }}

- uses: ./.github/actions/install

- name: Build
id: deploy
run: pnpm vercel-scripts deploy app.buildwithfern.com --token=${{ secrets.VERCEL_TOKEN }} --skip-deploy=true
env:
ANALYZE: 1

- name: Analyze bundle
if: steps.deploy.outputs.deployment_url
run: pnpm --package=nextjs-bundle-analysis dlx report
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/docs-bundle/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default (phase) => {
}

const withBundleAnalyzer = NextBundleAnalyzer({
enabled: true,
enabled: process.env.ANALYZE === "1",
});

return withBundleAnalyzer(withVercelEnv(nextConfig));
Expand Down

0 comments on commit 4ca4a78

Please sign in to comment.