-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (32 loc) · 958 Bytes
/
deploy.yml
File metadata and controls
37 lines (32 loc) · 958 Bytes
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
name: Deploy
on:
push:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Clone API submodule'
env:
REPO_KEY: ${{ secrets.API_REPOSITORY_KEY }}
run: |
echo "$REPO_KEY" > repo.key && chmod 400 repo.key
export GIT_SSH_COMMAND="ssh -i repo.key"
git submodule update --init
rm repo.key
- name: 'Setup node'
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 'Deploy to Vercel'
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: |
prodDeployArg=""
if [[ ${GITHUB_REF} == "refs/heads/main" ]]; then
prodDeployArg="--prod"
fi
npx vercel --token ${VERCEL_TOKEN} $prodDeployArg