chore(CI): add Backend Deploy
workflow
#4
Workflow file for this run
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: Backend Deploy | |
on: | |
push: | |
branches: [main, deploy-testnet] | |
workflow_dispatch: | |
jobs: | |
deploy-testnet: | |
environment: testnet | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to testnet | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | | |
cd ${{ secrets.SSH_WORK_DIR }} | |
git status | |
git fetch origin main | |
git checkout origin/main | |
git status | |
echo ${{ secrets.SSH_PASSWORD }} | sudo -S docker compose ps | |
echo ${{ secrets.SSH_PASSWORD }} | sudo -S docker compose build | |
echo ${{ secrets.SSH_PASSWORD }} | sudo -S docker compose up -d | |
echo ${{ secrets.SSH_PASSWORD }} | sudo -S docker compose ps |