-
Notifications
You must be signed in to change notification settings - Fork 539
48 lines (42 loc) · 1.28 KB
/
devnet.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
name: Devnet
on:
pull_request:
types: [ labeled ]
jobs:
devnet:
if: ${{ github.event.label.name == 'deploy-devnet' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Copy scripts folder to remote server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
source: "scripts/"
target: "~/"
overwrite: true
- name: Clear previous deployment
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
command_timeout: "30m"
script: |
cd ~/scripts
bash purge.sh
- name: Execute deployment script
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
command_timeout: "120m"
script: |
cd ~/scripts
bash setup.sh ${{ github.event.pull_request.head.sha }} ${{ vars.LC_TAG }} ${{ vars.VAL_COUNT }} ${{ vars.NODE_COUNT }} ${{ vars.LC_COUNT }}