[FIX] 修正正式環境 CI/CD 卡在 apt-get 互動提示的問題
1. 加入 DEBIAN_FRONTEND=noninteractive 環境變數。 2. 增加 Dpkg::Options 強制自動處理設定檔衝突,避免部署掛起。
This commit is contained in:
parent
c92ced4150
commit
cb9b8b072d
@ -14,7 +14,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Step 1 - Sync Code to Server
|
- name: Step 1 - Sync Code to Server
|
||||||
run: |
|
run: |
|
||||||
apt-get update && apt-get install -y rsync openssh-client
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
apt-get update && apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" rsync openssh-client
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.PROD_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa_prod
|
echo "${{ secrets.PROD_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa_prod
|
||||||
chmod 600 ~/.ssh/id_rsa_prod
|
chmod 600 ~/.ssh/id_rsa_prod
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user