@@ -3,14 +3,13 @@ name: Build Reusable Steps
33on :
44 workflow_call :
55 outputs :
6- build_output :
6+ build_output : # Changed from build-output to build_output for consistency
77 description : " Build output artifact"
88 value : ${{ jobs.build.outputs.build_output }}
99jobs :
1010 build :
1111 name : " Build Application"
1212 runs-on : ubuntu-latest
13-
1413 outputs :
1514 build_output : ${{ steps.build_step.outputs.result }}
1615
2928 version : 8
3029 run_install : false
3130
32- - name : Get pnpm store directory
31+ - name : Get pnpm store directory
3332 id : pnpm-cache
3433 shell : bash
3534 run : |
4342 restore-keys : |
4443 ${{ runner.os }}-pnpm-store-
4544
46- # Install dependencies with fallback logic
4745 - name : Install dependencies
4846 run : |
4947 # Attempt to install with --frozen-lockfile first
@@ -57,13 +55,12 @@ jobs:
5755 pnpm install
5856 fi
5957
60- # Set up environment variables from GitHub secrets
6158 - name : Set up environment variables
6259 run : |
6360 # Create .env file
6461 touch .env
6562
66- # Add Convex specific variables
63+ # Add Convex specific variables
6764 echo "NEXT_PUBLIC_CONVEX_URL=${{ secrets.NEXT_PUBLIC_CONVEX_URL }}" >> .env
6865 echo "CONVEX_DEPLOYMENT=${{ secrets.CONVEX_DEPLOYMENT }}" >> .env
6966
@@ -75,11 +72,13 @@ jobs:
7572 echo "LIVE_BLOCK_SECRET_API_KEY=${{secrets.LIVE_BLOCK_SECRET_API_KEY}}" >> .env
7673
7774 - name : Build
78- run : pnpm build
75+ id : build_step # Added this ID which is referenced in the outputs
76+ run : |
77+ pnpm build
78+ echo "result=success" >> $GITHUB_OUTPUT
7979 env :
8080 NEXT_PUBLIC_CONVEX_URL : ${{ secrets.NEXT_PUBLIC_CONVEX_URL }}
8181
82- # Upload the build artifacts to be used by the deploy job
8382 - name : Upload build artifacts
8483 uses : actions/upload-artifact@v4
8584 with :
9089 package.json
9190 pnpm-lock.yaml
9291 next.config.js
93- .env
92+ .env
0 commit comments