Skip to content

ci: updated GitHub Action action version #2

ci: updated GitHub Action action version

ci: updated GitHub Action action version #2

name: Backend Deployment
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up SSH connection
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: SSH into server and update code
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/ubuntu/.docker/datsmysong
git pull
- name: Stop containers
run: docker-compose -f /home/ubuntu/.docker/datsmysong/docker-compose.yml down
- name: Start containers
run: docker-compose -f /home/ubuntu/.docker/datsmysong/docker-compose.yml up -d