-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.82 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
55
56
57
name: publish
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the Wallet
uses: actions/checkout@v2
with:
path: 'synergy-wallet'
- name: Checkout the Core project
uses: actions/checkout@v2
with:
repository: 'synergatika/synergy-core'
path: 'synergy-core'
- uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Install core library dependencies
working-directory: synergy-core
run: npm install
- name: Install wallet dependencies
working-directory: synergy-wallet
run: npm install
- name: set env
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: update project version
working-directory: synergy-wallet
run: |
RELEASE_VERSION=${RELEASE_VERSION#"v"}
echo $RELEASE_VERSION
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- run: npm run config && npx ng build --prod
env:
API_URL: ${{ secrets.API_URL }}
APP_URL: ${{ secrets.APP_URL }}
OPEN_URL: ${{ secrets.OPEN_URL }}
MAP_API_KEY: ${{ secrets.MAP_API_KEY }}
working-directory: synergy-wallet
- name: deploy to server
uses: AEnterprise/rsync-deploy@v1.0
env:
DEPLOY_KEY: ${{ secrets.SERVER_SSH_KEY }}
ARGS: "-e -c -r --delete"
SERVER_PORT: ${{ secrets.SERVER_PORT }}
FOLDER: "./synergy-wallet/dist/synergy-wallet/*"
SERVER_IP: ${{ secrets.SERVER_IP }}
USERNAME: ${{ secrets.USERNAME }}
SERVER_DESTINATION: ${{ secrets.SERVER_DESTINATION }}