Merge pull request #64 from skni-kod/dev #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Staging deploy | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build: | |
uses: ./.github/workflows/build_push.yml | |
deploy: | |
needs: [build] | |
environment: production | |
runs-on: self-hosted | |
steps: | |
- name: Staging deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.REMOTE_HOST }} | |
username: ${{ secrets.REMOTE_USER }} | |
port: ${{ secrets.REMOTE_PORT }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | | |
set -e | |
cd /home/kni/prace_kol | |
docker compose --file docker-compose.prod.yml pull && docker compose --file docker-compose.prod.yml up -d | |
docker system prune -a -f |