mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
26 lines
582 B
YAML
26 lines
582 B
YAML
name: CD
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["CI"]
|
|
branches: [main]
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
|
|
steps:
|
|
- 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 /path/to/project
|
|
docker-compose pull
|
|
docker-compose up -d
|
|
docker system prune -f |