-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 1016 Bytes
/
deploy-to-dev.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
37
38
39
name: Deploy to Dev
on:
push:
branches:
- develop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set Vercel Environment Variables
run: |
echo "VERCEL_ORG_ID=${{ secrets.VERCEL_ORG_ID }}" >> $GITHUB_ENV
echo "VERCEL_PROJECT_ID=${{ secrets.VERCEL_DEV_PROJECT_ID }}" >> $GITHUB_ENV
- name: Install dependencies
run: npm install
- name: Create .env file
run: |
echo "JWT_SECRET=\"${{ secrets.DEV_JWT_SECRET }}\"" >> .env
echo "DATABASE_URL=\"${{ secrets.DEV_DATABASE_URL }}\"" >> .env
echo "CRYPTO_SECRET_KEY=\"${{ secrets.DEV_CRYPTO_SECRET_KEY }}\"" >> .env
echo "ACCESS_CODE_EXPIRY=\"1y\"" >> .env
echo "ENV=\"development\"" >> .env
- name: Build project
run: npm run build
- name: Install Vercel CLI
run: npm i -g vercel@latest
- name: Deploy to Vercel
run: vercel --token ${{ secrets.VERCEL_TOKEN }} --prod