feat: add deployment step to production server in Docker workflow

This commit is contained in:
Frank John Begornia
2025-11-27 01:24:27 +08:00
parent 6ff46125ab
commit b3f0d50f01

View File

@@ -63,3 +63,18 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy to production server
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SERVER_PORT || 22 }}
script: |
cd ${{ secrets.SERVER_PATH || '/root/crew-infrastructure' }}
export SLIPMATZ_WEB_TAG=main
docker compose pull slipmatz_web
docker compose up -d slipmatz_web
docker compose ps slipmatz_web