-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (48 loc) · 1.53 KB
/
deploy.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Deploy to Staging
on:
push:
branches:
- "main"
jobs:
call_build:
name: Build
uses: ./.github/workflows/build.yml
secrets: inherit
ember_test:
name: Ember Testing
needs: call_build
uses: ./.github/workflows/ember_test.yml
secrets: inherit
cypress_test:
name: Cypress Testing
needs: call_build
uses: ./.github/workflows/cypress_test.yml
secrets: inherit
deploy:
needs: [call_build, ember_test, cypress_test]
runs-on: ubuntu-latest
environment: vercel-bracco-preview
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Extract variables
shell: bash
run: |
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')" >> $GITHUB_OUTPUT
echo "GIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "GIT_SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
id: extract_variables
- name: Vercel deploy
uses: amondnet/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
vercel-args: ${{ vars.VERCEL_NOCACHE == 'true' && '--force' || '' }} --build-env HANDLE_SERVER=${{vars.HANDLE_SERVER}}
scope: ${{ secrets.TEAM_ID}}
vercel-project-name: 'bracco'
alias-domains: |
doi.datacite.vercel.app
doi.stage.datacite.org