Skip to content

Commit

Permalink
Refactor: Add environment variable checks for Turso authentication an…
Browse files Browse the repository at this point in the history
…d database URL
  • Loading branch information
joywin2003 committed Sep 12, 2024
1 parent 00a14e8 commit 2b1c5a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ jobs:
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 != '' }}"
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 }}

- name: Build project
run: npm run build
Expand All @@ -47,6 +51,8 @@ jobs:
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 }}

- name: Upload build artifacts (optional)
if: always()
Expand Down

0 comments on commit 2b1c5a4

Please sign in to comment.