-
Notifications
You must be signed in to change notification settings - Fork 25
63 lines (55 loc) · 1.69 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: deploy
on:
push:
branches:
- '*'
jobs:
staging-production:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Build dashboard
run: yarn install && yarn build
- name: Upload dashboard build - staging
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST_STAGING }}
username: ${{ secrets.USER }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
source: "build"
target: "~"
- name: Pin dashboard build - staging
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_STAGING }}
username: ${{ secrets.USER }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
./btfs/bin/btfs add -r build | tail -1 | awk '{print $2}'
rm -rf ~/build
- name: Upload dashboard build - production
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST_PRODUCTION }}
username: ${{ secrets.USER }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
source: "build"
target: "~"
- name: Pin dashboard build - production
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_PRODUCTION }}
username: ${{ secrets.USER }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
./btfs/bin/btfs add -r build | tail -1 | awk '{print $2}'
rm -rf ~/build