Skip to content

Workflow file for this run

name: Continuous Deployment
on:
workflow_dispatch:
push:
branches:
- production
paths-ignore:
- .gitignore
- README.md
- start-database.sh
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: executing deploy via ssh
uses: appleboy/[email protected]
with:
host: ${{secrets.HOST}}
username: ${{secrets.USERNAME}}
password: ${{secrets.PASS}}
command_timeout: 600s
script: |
UNSTAGGED_IMAGE_ID=$(docker images --filter=reference=site-struct-2024-web:latest --format "{{.ID}}")
cd docker_compose_struct/
git pull
cd site-struct-2024/
docker stop $(docker ps -aq)
execute_with_retry 2 "docker compose build web"
execute_with_retry 2 "docker compose up -d"
docker start $(docker ps -aq)
docker rmi $UNSTAGGED_IMAGE_ID