Conversation
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| on: | ||
| # Runs on pushes targeting the default branch | ||
| push: | ||
| branches: ["main"] |
There was a problem hiding this comment.
Two workflows deploy to GitHub Pages on main
Both deploy.yml and the newly added gatsby.yml trigger on push to main and deploy to GitHub Pages. deploy.yml uses peaceiris/actions-gh-pages (pushes to gh-pages branch) while gatsby.yml uses actions/deploy-pages (artifact-based deployment). These workflows will race on every push, causing unpredictable deployment behavior where one deployment could immediately overwrite the other or fail due to conflicts.
Additional Locations (1)
| if: github.ref == 'refs/heads/main' | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: ./dist No newline at end of file |
There was a problem hiding this comment.
Missing write permission for actions-gh-pages deployment
The peaceiris/actions-gh-pages@v3 action requires contents: write permission to push to the gh-pages branch. The workflow removed the permissions block entirely, so it relies on repository default permissions. This can cause the deployment to fail with a permission error if the repository restricts the default GITHUB_TOKEN permissions.
| run: npm ci | ||
|
|
||
| - name: Build | ||
| run: npm run build |
There was a problem hiding this comment.
Build environment variables removed affecting production optimization
The build step removed the NODE_ENV: production and CI: true environment variables that were present in the original workflow. Many build tools (React, Webpack, etc.) check NODE_ENV to enable production optimizations like minification and dead code elimination. Without NODE_ENV=production, the deployed build may include debug code and lack production optimizations, resulting in larger bundles and slower performance.
.github/workflows/deploy.yml
Outdated
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write |
There was a problem hiding this comment.
Missing concurrency settings allow deployment race conditions
The concurrency block was removed from deploy.yml. Without concurrency controls, multiple rapid pushes to main will trigger simultaneous workflow runs. When peaceiris/actions-gh-pages attempts to git-push to the gh-pages branch from concurrent runs, this can cause push conflicts or one deployment silently overwriting another mid-push.
Note
Introduces a dedicated Gatsby Pages workflow and streamlines the existing GitHub Pages deployment.
/.github/workflows/gatsby.ymlwith separatebuildanddeployjobs: auto-detects package manager, uses Node 20, caches.cache/public, builds Gatsby withPREFIX_PATHS, uploads artifact, and deploys viaactions/deploy-pages@v4./.github/workflows/deploy.ymlinto a singlebuild-and-deployjob: runs onpushandpull_requesttomain, uses Node 18, builds, removesdist/README.md, and deploys to Pages withpeaceiris/actions-gh-pages@v3(only onmain).Written by Cursor Bugbot for commit 6fd673e. This will update automatically on new commits. Configure here.