-
Notifications
You must be signed in to change notification settings - Fork 35
48 lines (42 loc) · 1.22 KB
/
deploy.yaml
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
name: Reuseable deploy action
on:
workflow_call:
inputs:
deployOptions:
required: true
type: string
environment:
required: true
type: string
secrets:
serverPrivateKey:
required: true
vercelOrganizationId:
required: true
vercelProjectId:
required: true
vercelToken:
required: true
jobs:
deploy:
name: "Deploy server"
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: 'Debugging information'
run: |
echo ${{ inputs.environment }}
echo ${{ secrets.serverPrivateKey }} | wc -c
- uses: actions/checkout@v2
- name: Install server dependencies
run: yarn
working-directory: ./web-server
- name: 'Install Vercel CLI'
run: npm i -g vercel
- name: "Deploy to Vercel"
run: npx vercel --token ${{ secrets.vercelToken }} ${{ inputs.deployOptions }} --env PRIVATE_KEY=${{ secrets.serverPrivateKey }}
env:
VERCEL_TOKEN: ${{ secrets.vercelToken }}
VERCEL_PROJECT_ID: ${{ secrets.vercelProjectId }}
VERCEL_ORG_ID: ${{ secrets.vercelOrganizationId }}
working-directory: .