Skip to content

Commit

Permalink
Update cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CYHFREDA authored Oct 15, 2024
1 parent 74fc234 commit e3e4272
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -16,7 +15,7 @@ jobs:
uses: appleboy/[email protected]
with:
host: 0.tcp.jp.ngrok.io
port: 15637
port: 19772
username: root
key: ${{ secrets.specialtopic }}
script: |
Expand All @@ -38,14 +37,15 @@ jobs:
uses: appleboy/[email protected]
with:
host: 0.tcp.jp.ngrok.io
port: 15637
port: 19772
username: root
key: ${{ secrets.specialtopic }}
script: |
set -e # 當腳本出現錯誤時終止執行
cd /opt/specialtopic
git pull origin main && docker-compose down && docker-compose up -d --build
docker exec nginx nginx -s reload
docker ps
- name: Notify on successful deployment via Telegram
if: success() # 只有在成功時發送通知
Expand Down

0 comments on commit e3e4272

Please sign in to comment.