-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 1.88 KB
/
github-actions.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
55
56
name: GitHub Actions
on: [push]
jobs:
dev-deploy:
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
environment: dev
steps:
- run: echo "🎉 ${{ github.repository }}, ${{ github.ref }}, ${{ github.event_name }} , ${{ runner.os }}, "
- uses: actions/checkout@v2
with:
ref: dev
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: RECAPTCHA_KEY=6LdmRHogAAAAAF9YN6bMc6hNExitqRJog3-wDkH- CREDENTIAL_SERVICE=https://credential-service.starks.network ZKID_SERVICE=https://zkid-service.starks.network/v2 yarn build
- uses: appleboy/scp-action@master
with:
username: ubuntu
host: ${{ secrets.HOST }}
port: 22
key: ${{ secrets.KEY }}
source: ${{ github.workspace }}/packages/app/build
target: "/home/ubuntu/zkID-interface-v2"
strip_components: 5
rm: true
prod-deploy:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
environment: master
steps:
- uses: actions/checkout@v2
with:
ref: master
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: RECAPTCHA_KEY=6LdmRHogAAAAAF9YN6bMc6hNExitqRJog3-wDkH- CREDENTIAL_SERVICE=https://credential-service.zkid.app ZKID_SERVICE=https://zkid-service.zkid.app/v2 yarn build
- uses: appleboy/scp-action@master
with:
username: ubuntu
host: ${{ secrets.HOST }}
port: 22
key: ${{ secrets.KEY }}
source: ${{ github.workspace }}/packages/app/build
target: "/home/ubuntu/zkID-interface-v2"
strip_components: 5
rm: true