Skip to content

Commit 96510ae

Browse files
committed
wip
1 parent eea4ffd commit 96510ae

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.github/workflows/build-reusable.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: Build Reusable Steps
33
on:
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 }}
99
jobs:
1010
build:
1111
name: "Build Application"
1212
runs-on: ubuntu-latest
13-
1413
outputs:
1514
build_output: ${{ steps.build_step.outputs.result }}
1615

@@ -29,7 +28,7 @@ jobs:
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: |
@@ -43,7 +42,6 @@ jobs:
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:
@@ -90,4 +89,4 @@ jobs:
9089
package.json
9190
pnpm-lock.yaml
9291
next.config.js
93-
.env
92+
.env

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ on:
66
branches: [main]
77
jobs:
88
build:
9+
if: github.event.pull_request.merged == true
910
name: Build Application
10-
uses: ./build-reusable.yml
11+
uses: ./.github/workflows/build-reusable.yml

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ on:
66
jobs:
77
build:
88
name: Build Application
9-
uses: ./build-reusable.yml
9+
uses: ./.github/workflows/build-reusable.yml
1010

1111
deploy:
1212
name: Deploy Application to Vercel
1313
runs-on: ubuntu-latest
14-
needs: call-build-steps
14+
needs: build
1515
environment: production
1616
steps:
1717
- name: Checkout Code

0 commit comments

Comments
 (0)