Deploy to calibration net on a dedicated server #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ubuntu | |
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }} | |
source: "scripts/deploy_subnet_under_calibration_net/deploy.sh" | |
target: "/home/ubuntu" | |
- name: Copy config files to the host | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }} | |
username: ubuntu | |
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }} | |
source: "scripts/deploy_subnet_under_calibration_net/.ipc" | |
target: "/home/ubuntu" | |
- name: Set up ipc config folder on the host | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }} | |
username: ubuntu | |
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }} | |
script: rm -rf /home/ubuntu/.ipc && cp -r /home/ubuntu/scripts/deploy_subnet_under_calibration_net/.ipc /home/ubuntu/ | |
- name: Create wallet file locally | |
run: | | |
echo '${{ secrets.CI_TEST_WALLET_JSON }}' > evm_keystore.json | |
- name: Copy wallet file to the host | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }} | |
username: ubuntu | |
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }} | |
source: "evm_keystore.json" | |
target: "/home/ubuntu/.ipc" | |
- name: Run deploy scripts on the host | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.DEDICATED_SERVER_IP_ADDRESS }} | |
username: ubuntu | |
key: ${{ secrets.DEDICATED_SERVER_PRIVATE_KEY }} | |
script: bash -il /home/ubuntu/scripts/deploy_subnet_under_calibration_net/deploy.sh ${{ github.ref_name }} | |
command_timeout: 50m |