chore: 更新 CI/CD 部署目標至新主機 (220.132.7.82)
This commit is contained in:
@@ -9,13 +9,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
# --- 1. Demo 環境部署 (103 本機) ---
|
# --- 1. Demo 環境部署 (103 本機) ---
|
||||||
deploy-demo:
|
deploy-demo:
|
||||||
if: github.ref == 'refs/heads/demo'
|
if: false # github.ref == 'refs/heads/demo' (暫時停用)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
github-server-url: http://192.168.0.103:3000
|
# github-server-url: ${{ github.server_url }} # 自動偵測
|
||||||
repository: ${{ github.repository }}
|
repository: ${{ github.repository }}
|
||||||
|
|
||||||
- name: Step 1 - Push Code to Demo
|
- name: Step 1 - Push Code to Demo
|
||||||
@@ -120,7 +120,6 @@ jobs:
|
|||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
github-server-url: http://192.168.0.103:3000
|
|
||||||
repository: ${{ github.repository }}
|
repository: ${{ github.repository }}
|
||||||
|
|
||||||
- name: Step 1 - Push Code to Production
|
- name: Step 1 - Push Code to Production
|
||||||
@@ -136,8 +135,8 @@ jobs:
|
|||||||
--exclude='vendor' \
|
--exclude='vendor' \
|
||||||
--exclude='storage' \
|
--exclude='storage' \
|
||||||
--exclude='public/build' \
|
--exclude='public/build' \
|
||||||
-e "ssh -p 2224 -i ~/.ssh/id_rsa_prod -o StrictHostKeyChecking=no" \
|
-e "ssh -p 2227 -i ~/.ssh/id_rsa_prod -o StrictHostKeyChecking=no" \
|
||||||
./ root@erp.koori.tw:/var/www/star-erp/
|
./ root@220.132.7.82:/var/www/star-erp/
|
||||||
rm ~/.ssh/id_rsa_prod
|
rm ~/.ssh/id_rsa_prod
|
||||||
|
|
||||||
|
|
||||||
@@ -146,8 +145,8 @@ jobs:
|
|||||||
id: check_rebuild_prod
|
id: check_rebuild_prod
|
||||||
uses: appleboy/ssh-action@master
|
uses: appleboy/ssh-action@master
|
||||||
with:
|
with:
|
||||||
host: erp.koori.tw
|
host: 220.132.7.82
|
||||||
port: 2224
|
port: 2227
|
||||||
username: root
|
username: root
|
||||||
key: ${{ secrets.PROD_SSH_KEY }}
|
key: ${{ secrets.PROD_SSH_KEY }}
|
||||||
script: |
|
script: |
|
||||||
@@ -167,8 +166,8 @@ jobs:
|
|||||||
- name: Step 3 - Container Up & Health Check
|
- name: Step 3 - Container Up & Health Check
|
||||||
uses: appleboy/ssh-action@master
|
uses: appleboy/ssh-action@master
|
||||||
with:
|
with:
|
||||||
host: erp.koori.tw
|
host: 220.132.7.82
|
||||||
port: 2224
|
port: 2227
|
||||||
username: root
|
username: root
|
||||||
key: ${{ secrets.PROD_SSH_KEY }}
|
key: ${{ secrets.PROD_SSH_KEY }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
Reference in New Issue
Block a user