Deploy #59
This file contains 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: 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 |