-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1.17 KB
/
preview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Preview
on:
push:
branches-ignore:
- main
env:
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD_INLINE: ${{ secrets.SUPABASE_DB_PASSWORD }}
SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
jobs:
Deploy:
runs-on: ubuntu-latest
environment: Preview
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- run: pnpm i
- run:
pnpm exec vercel pull --yes --environment=preview
--token="$VERCEL_TOKEN"
- run: pnpm exec supabase link --project-ref "$SUPABASE_PROJECT_ID"
- run: pnpm run db:start
- run: pnpm run db:types
- run: pnpm exec next telemetry disable
- run: pnpm exec vercel build
- run:
pnpm exec supabase db push --password "$SUPABASE_DB_PASSWORD_INLINE"
- run: pnpm exec vercel deploy --prebuilt --token="$VERCEL_TOKEN"