-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (34 loc) · 1.24 KB
/
nextjs.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
34
35
36
name: Build Next.js Site
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create .env with Github Secrets
run: |
touch .env
echo NEXT_PUBLIC_SUPABASE_URL=$ENV_VAR_1 >> .env
echo NEXT_PUBLIC_SUPABASE_ANON_KEY=$ENV_VAR_2 >> .env
echo SUPABASE_SERVICE_ROLE_KEY=$ENV_VAR_3 >> .env
echo OPENAI_API_KEY=$ENV_VAR_4 >> .env
echo MISTRAL_API_KEY=$ENV_VAR_5 >> .env
echo STRIPE_SECRET_KEY=$ENV_VAR_6 >> .env
echo STRIPE_WEBHOOK_SECRET=$ENV_VAR_7 >> .env
env:
ENV_VAR_1: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
ENV_VAR_2: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
ENV_VAR_3: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
ENV_VAR_4: ${{ secrets.OPENAI_API_KEY }}
ENV_VAR_5: ${{ secrets.MISTRAL_API_KEY }}
ENV_VAR_6: ${{ secrets.STRIPE_SECRET_KEY }}
ENV_VAR_7: ${{ secrets.STRIPE_WEBHOOK_SECRET }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install dependencies
run: npm install
- name: Build
run: npm run build