-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (66 loc) · 2.79 KB
/
deploy-to-dedicated-host.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
64
65
66
67
68
69
name: Deploy to calibration net on a dedicated server
on:
workflow_dispatch:
concurrency:
# Only allow one run at a time for this workflow
group: deploy-to-dedicated-host
cancel-in-progress: true
jobs:
deploy_to_dedicated_host:
runs-on: ubuntu-latest
steps:
- name: Checkout code repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Copy deployment script files to the host
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: textile
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
source: "scripts/deploy_subnet_under_calibration_net/deploy.sh"
target: "/home/textile"
- name: Copy config files to the host
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: textile
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
source: "scripts/deploy_subnet_under_calibration_net/.ipc"
target: "/home/textile"
- name: Set up ipc config folder on the host
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: textile
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
script: (rm -rf /home/textile/.ipc || rm -rf /home/textile/.ipc) && cp -r /home/textile/scripts/deploy_subnet_under_calibration_net/.ipc /home/textile/
- name: Create wallet file locally
run: |
echo '${{ secrets.CI_TEST_WALLET_JSON }}' > evm_keystore.json
echo '${{ secrets.CI_TEST_PROXY_WALLET_JSON }}' | tr -d '\n' > evm_keystore_proxy.json
- name: Copy wallet file to the host
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: textile
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
source: "evm_keystore.json"
target: "/home/textile/.ipc"
- name: Copy proxy wallet file to the host
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: textile
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
source: "evm_keystore_proxy.json"
target: "/home/textile/.ipc"
- name: Run deploy scripts on the host
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }}
username: textile
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }}
script: PARENT_HTTP_AUTH_TOKEN=${{ secrets.PARENT_HTTP_AUTH_TOKEN }} bash -il /home/textile/scripts/deploy_subnet_under_calibration_net/deploy.sh ${{ github.ref_name }}
command_timeout: 120m