Skip to content

Commit

Permalink
chore(CI): add Backend Deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Flouse committed Jul 19, 2024
1 parent 0353a3b commit 2be0800
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/backend-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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

0 comments on commit 2be0800

Please sign in to comment.