Skip to content

Commit b7eacec

Browse files
author
SWCIITGWeb
committed
Add GitHub Actions workflow for backend deployment
1 parent 9c6776f commit b7eacec

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy Backend
2+
3+
# Controls when the action will run. Workflow runs when manually triggered using the UI
4+
# or API.
5+
on:
6+
workflow_dispatch:
7+
8+
9+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
10+
jobs:
11+
build:
12+
name: Building and Deploying Backend
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Establish ssh connection
16+
uses: appleboy/ssh-action@master
17+
with:
18+
host: ${{ secrets.SSH_HOST }}
19+
key: ${{ secrets.SSH_KEY }}
20+
passphrase: ${{ secrets.SSH_PASSPHRASE }}
21+
port: ${{ secrets.SSH_PORT }}
22+
username: ${{ secrets.SSH_USERNAME }}
23+
script: |
24+
cd /webapps/swc_website/backend
25+
docker compose -f docker-compose.yml up -d --build

0 commit comments

Comments
 (0)