-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0b6f2e
commit c4d21b3
Showing
1 changed file
with
57 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,69 @@ | ||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Check Environment Variables | ||
run: | | ||
echo "NEXT_PUBLIC_SITE_URL is set: ${{ env.NEXT_PUBLIC_SITE_URL != '' }}" | ||
echo "NEXTAUTH_SECRET is set: ${{ env.NEXTAUTH_SECRET != '' }}" | ||
echo "GOOGLE_ID is set: ${{ env.GOOGLE_ID != '' }}" | ||
echo "GOOGLE_SECRET is set: ${{ env.GOOGLE_SECRET != '' }}" | ||
echo "TURSO_AUTH_TOKEN is set: ${{ env.TURSO_AUTH_TOKEN != '' }}" | ||
echo "TURSO_DATABASE_URL is set: ${{ env.TURSO_DATABASE_URL != '' }}" | ||
echo "RESEND_API_KEY" is set ${{ env.RESEND_API_KEY != '' }} | ||
echo | ||
env: | ||
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }} | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
GOOGLE_ID: ${{ secrets.GOOGLE_ID }} | ||
GOOGLE_SECRET: ${{ secrets.GOOGLE_SECRET }} | ||
TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }} | ||
TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }} | ||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} | ||
- name: Check Environment Variables | ||
run: | | ||
echo "NEXT_PUBLIC_SITE_URL is set: ${{ env.NEXT_PUBLIC_SITE_URL != '' }}" | ||
echo "NEXTAUTH_SECRET is set: ${{ env.NEXTAUTH_SECRET != '' }}" | ||
echo "GOOGLE_ID is set: ${{ env.GOOGLE_ID != '' }}" | ||
echo "GOOGLE_SECRET is set: ${{ env.GOOGLE_SECRET != '' }}" | ||
echo "TURSO_AUTH_TOKEN is set: ${{ env.TURSO_AUTH_TOKEN != '' }}" | ||
echo "TURSO_DATABASE_URL is set: ${{ env.TURSO_DATABASE_URL != '' }}" | ||
echo "RESEND_API_KEY" is set ${{ env.RESEND_API_KEY != '' }} | ||
echo | ||
env: | ||
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }} | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
GOOGLE_ID: ${{ secrets.GOOGLE_ID }} | ||
GOOGLE_SECRET: ${{ secrets.GOOGLE_SECRET }} | ||
TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }} | ||
TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }} | ||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} | ||
|
||
- name: Build project | ||
run: npm run build | ||
env: | ||
GOOGLE_ID: ${{ secrets.GOOGLE_ID }} | ||
GOOGLE_SECRET: ${{ secrets.GOOGLE_SECRET }} | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }} | ||
TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }} | ||
TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }} | ||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} | ||
RAZORPAY_KEY_ID: ${{ secrets.RAZORPAY_KEY_ID }} | ||
RAZORPAY_SECRET: ${{ secrets.RAZORPAY_SECRET }} | ||
NEXT_PUBLIC_RAZORPAY_KEY_ID: ${{ secrets.NEXT_PUBLIC_RAZORPAY_KEY_ID }} | ||
- name: Build project | ||
run: npx prisma generate && npx prisma migrate deploy && next build | ||
env: | ||
GOOGLE_ID: ${{ secrets.GOOGLE_ID }} | ||
GOOGLE_SECRET: ${{ secrets.GOOGLE_SECRET }} | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }} | ||
TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }} | ||
TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }} | ||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} | ||
RAZORPAY_KEY_ID: ${{ secrets.RAZORPAY_KEY_ID }} | ||
RAZORPAY_SECRET: ${{ secrets.RAZORPAY_SECRET }} | ||
NEXT_PUBLIC_RAZORPAY_KEY_ID: ${{ secrets.NEXT_PUBLIC_RAZORPAY_KEY_ID }} | ||
|
||
- name: Upload build artifacts (optional) | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build | ||
path: build # Adjust this if your build output is in a different directory | ||
- name: Upload build artifacts (optional) | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build | ||
path: build # Adjust this if your build output is in a different directory |