-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.01 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Deploy
on:
workflow_run:
workflows: ["Build and Push Falak Image", "Build and Push Website Image"]
types:
- completed
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Deploy the new stuff :D
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
username: deploy
key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
port: 22
script: |
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/deploy_jadwal_app
cd symmetrical-spoon
git pull
docker compose -f compose.yaml -f compose.prod.yaml pull
docker compose -f compose.yaml -f compose.prod.yaml up -d