File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,25 @@ runs:
3535 run : pnpm install --frozen-lockfile --prefer-offline --ignore-scripts
3636 shell : bash
3737
38+ - name : 🏷️ Generate cache key
39+ run : |
40+ # Create a reliable branch name for caching
41+ if [ "${{ github.event_name }}" = "pull_request" ]; then
42+ BRANCH_NAME="${{ github.head_ref }}"
43+ else
44+ BRANCH_NAME="${{ github.ref_name }}"
45+ fi
46+ # Clean branch name for cache key (remove special characters)
47+ CLEAN_BRANCH=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9-]/-/g')
48+ echo "TURBO_CACHE_KEY=$CLEAN_BRANCH" >> $GITHUB_ENV
49+ echo "Using cache key: $CLEAN_BRANCH"
50+ shell : bash
51+
3852 - name : 💾 Cache turbo build setup
3953 uses : actions/cache@v4
4054 with :
4155 path : .turbo
42- key : ${{ runner.os }}-turbo-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
56+ key : ${{ runner.os }}-turbo-${{ env.TURBO_CACHE_KEY }}-${{ github.sha }}
4357 restore-keys : |
44- ${{ runner.os }}-turbo-${{ github.head_ref || github.ref_name }}-
58+ ${{ runner.os }}-turbo-${{ env.TURBO_CACHE_KEY }}-
4559 ${{ runner.os }}-turbo-
Original file line number Diff line number Diff line change 6767
6868 - name : 🚀 Start Frontend App (Background)
6969 run : |
70- node .next/standalone/apps/frontend/server.js &
70+ node apps/frontend/ .next/standalone/apps/frontend/server.js &
7171 echo "FRONTEND_PID=$!" >> $GITHUB_ENV
7272 shell : bash
73+ env :
74+ NODE_ENV : production
75+ NEXTAUTH_SECRET : ' test-secret-for-ci-only'
76+ NEXT_PUBLIC_EXAMPLE_VARIABLE : ' CI Test Variable'
77+ PRIVATE_EXAMPLE_VARIABLE : ' Private CI Test Variable'
7378
7479 - name : ⏳ Wait for Frontend to be Ready
7580 run : |
You can’t perform that action at this time.
0 commit comments