Skip to content

Deploy

Deploy #10

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows: [Build]
types:
- completed
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Rebuild & restart containers on server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.KEY }}
script: docker-compose -f docker-compose-prod.yml pull && docker-compose -f docker-compose-prod.yml up -d --build