test #29
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: ["test"] | |
types: | |
- completed | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Connect to server via SSH | |
uses: appleboy/ssh-action@master | |
env: | |
CERTBOT_EMAIL: ${{secrets.CERTBOT_EMAIL}} | |
CERTBOT_DOMAIN: ${{secrets.CERTBOT_DOMAIN}} | |
with: | |
host: ${{secrets.SSH_HOST}} | |
username: ${{secrets.SSH_USERNAME}} | |
key: ${{secrets.SSH_KEY}} | |
port: 22 | |
envs: CERTBOT_EMAIL,CERTBOT_DOMAIN | |
script: | | |
export CERTBOT_EMAIL=$CERTBOT_EMAIL | |
export CERTBOT_DOMAIN=$CERTBOT_DOMAIN | |
echo $CERTBOT_EMAIL | |
echo 'duh kok gak bisa sih, emangn boleh' | |
env | |
cd ~/CeTour | |
docker compose -f docker-compose.prod.yaml config | |
git pull origin main | |
docker compose -f docker-compose.prod.yaml down | |
docker compose -f docker-compose.prod.yaml up -d --build |