Skip to content

Commit 614d408

Browse files
committed
ci: create vercel auto deploy pipeline
1 parent 7f875b1 commit 614d408

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: client-deploy.ci
2+
env:
3+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
4+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
5+
on:
6+
workflow_run:
7+
workflows: ['client.ci']
8+
types:
9+
- completed
10+
11+
jobs:
12+
13+
Deploy-Preview:
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Code
18+
- uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.event.workflow_run.head_sha }}
21+
22+
- name: Install Vercel
23+
run: npm install --global vercel@latest
24+
25+
- name: Pull Vercel
26+
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
27+
28+
- name: Build Artifacts
29+
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
30+
31+
- name: Deploy Project to Vercel
32+
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

server/docker/entrypoint.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
#!/bin/sh
2-
set -e
3-
4-
echo "[DEBUG] Waiting for postgres (sleeping 5s)..."
5-
sleep 5
6-
7-
echo "[DEBUG] Start prisma migration"
8-
npx prisma migrate deploy
9-
10-
echo "[DEBUG] Starting application..."
11-
exec node dist/src/main.js
1+

0 commit comments

Comments
 (0)