chore(deps): bump the dev-dependencies group with 7 updates #5293
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main, next] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
build: | |
name: Run Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache turbo build setup | |
uses: actions/cache@v4 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 10.x | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm build | |
env: | |
PAYLOAD_SECRET: ${{ secrets.PAYLOAD_SECRET || 'dev-secret-for-build-only' }} | |
DATABASE_URI: ${{ secrets.DATABASE_URI || 'mongodb://localhost:27017/payload-cms' }} | |
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY || 'resend-key-placeholder' }} | |
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY || 'sk_test_placeholder' }} | |
AI_GATEWAY_TOKEN: ${{ secrets.AI_GATEWAY_TOKEN || 'sk-1234' }} | |
AI_GATEWAY_URL: ${{ secrets.AI_GATEWAY_URL || 'https://llm.do' }} | |
ANALYZE: 'true' | |
# Bundle analysis steps | |
- name: Restore next build | |
uses: actions/cache@v4 | |
id: restore-build-cache | |
env: | |
cache-name: cache-next-build | |
with: | |
path: .next/cache | |
# If you use a different build directory, change this path | |
key: ${{ runner.os }}-build-${{ env.cache-name }} | |
- name: Analyze bundle | |
run: npx -p nextjs-bundle-analysis report | |
- name: Upload bundle | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bundle | |
path: .next/analyze/__bundle_analysis.json | |
- name: Download base branch bundle stats | |
uses: dawidd6/action-download-artifact@v6 | |
if: success() && github.event.number | |
with: | |
workflow: build.yml | |
branch: ${{ github.event.pull_request.base.ref }} | |
path: .next/analyze/base/bundle | |
if_no_artifact_found: warn | |
- name: Check if base branch bundle exists | |
id: check-base-bundle | |
if: success() && github.event.number | |
run: | | |
if [ -d ".next/analyze/base/bundle" ] && [ "$(ls -A .next/analyze/base/bundle 2>/dev/null)" ]; then | |
echo "base_bundle_exists=true" >> $GITHUB_OUTPUT | |
else | |
echo "base_bundle_exists=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Compare with base branch bundle | |
if: success() && github.event.number && steps.check-base-bundle.outputs.base_bundle_exists == 'true' | |
run: | | |
if [ -f ".next/analyze/base/bundle/bundle/__bundle_analysis.json" ]; then | |
# Fix path to match where the file is actually downloaded | |
mkdir -p .next/analyze/base/bundle | |
cp .next/analyze/base/bundle/bundle/__bundle_analysis.json .next/analyze/base/bundle/ | |
npx -p nextjs-bundle-analysis compare | |
else | |
echo "No base bundle analysis file found. Skipping comparison." | |
# Debug - list all files in base bundle directory | |
echo "Debug: Listing base bundle directory contents" | |
find .next/analyze/base -type f | sort || echo "Base directory not found or empty" | |
fi | |
- name: Check Comment File | |
id: check-comment | |
if: success() && github.event.number | |
run: | | |
if [ -f .next/analyze/__bundle_analysis_comment.txt ]; then | |
echo "comment file exists" | |
cat .next/analyze/__bundle_analysis_comment.txt | |
echo "comment_exists=true" >> $GITHUB_OUTPUT | |
else | |
echo "comment file does not exist" | |
echo "comment_exists=false" >> $GITHUB_OUTPUT | |
# Enhanced debugging - list all files in analyze directory structure | |
echo "Debug: Listing analyze directory contents" | |
ls -la .next/analyze/ || echo "Analyze directory not found" | |
echo "Debug: Checking if analyze directory exists" | |
if [ -d ".next/analyze" ]; then | |
find .next/analyze -type f | sort | |
else | |
echo "The .next/analyze directory does not exist" | |
fi | |
fi | |
- name: Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: success() && github.event.number && steps.check-comment.outputs.comment_exists == 'true' | |
with: | |
header: next-bundle-analysis | |
path: .next/analyze/__bundle_analysis_comment.txt | |
recreate: true |