-
Notifications
You must be signed in to change notification settings - Fork 65
60 lines (51 loc) · 1.78 KB
/
Copy pathprisma.yml
File metadata and controls
60 lines (51 loc) · 1.78 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Deploy to Prisma Compute
on:
push:
branches:
- main
workflow_dispatch:
jobs:
prisma:
name: "Deploy to Prisma Compute"
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: platforms/prisma
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- name: Check Required Secrets
run: |
REQUIRED=(PRISMA_SERVICE_TOKEN PRISMA_PROJECT_ID PRISMA_APP_NAME)
for var in "${REQUIRED[@]}"; do
if [ -z "${!var}" ]; then
echo "❌ Error: $var is missing in GitHub Secrets."
exit 1
fi
done
env:
PRISMA_SERVICE_TOKEN: ${{ secrets.PRISMA_SERVICE_TOKEN }}
PRISMA_PROJECT_ID: ${{ secrets.PRISMA_PROJECT_ID }}
PRISMA_APP_NAME: ${{ secrets.PRISMA_APP_NAME }}
- name: Inject Commit Hash & Platform
run: node scripts/inject_vars.js --platform=prisma
- name: Update Prisma Configuration
run: |
node scripts/update_prisma.js
working-directory: platforms/prisma
env:
PRISMA_APP_NAME: ${{ secrets.PRISMA_APP_NAME }}
- name: Deploy via Prisma CLI
working-directory: platforms/prisma
run: npx @prisma/cli app deploy --app ${{ secrets.PRISMA_APP_NAME }} --project ${{ secrets.PRISMA_PROJECT_ID }} --region ${{ secrets.PRISMA_APP_REGION || 'eu-central-1' }} --branch main --prod --yes
env:
PRISMA_SERVICE_TOKEN: ${{ secrets.PRISMA_SERVICE_TOKEN }}
- name: Success Notification
run: echo "🚀 NodeAuth deployed successfully to Prisma Compute!"