Skip to content

chore(deps): bump the npm_and_yarn group across 1 directory with 4 up… #94

chore(deps): bump the npm_and_yarn group across 1 directory with 4 up…

chore(deps): bump the npm_and_yarn group across 1 directory with 4 up… #94

name: Backend Deployment
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
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: Update and restart containers
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
docker-compose down
docker-compose up -d --force-recreate --build