Skip to content

add publix back for test #3

add publix back for test

add publix back for test #3

Workflow file for this run

name: Deploy to Production
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Copy files to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
source: "."
target: "/opt/court-allocation"
- name: Deploy to server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
cd /opt/court-allocation
# Build the new image
docker build -t court-allocation:latest .
# Stop and remove the existing container if it exists
docker stop court-allocation || true
docker rm court-allocation || true
# Run the new container
docker run -d \
--name court-allocation \
--restart unless-stopped \
-p 80:7860 \
court-allocation:latest
# Clean up old images
docker image prune -f