fix: use absolute path /root/.ssh/id_deploy in CI
Some checks failed
Deploy Bot on NAS / deploy (push) Has been cancelled
Some checks failed
Deploy Bot on NAS / deploy (push) Has been cancelled
This commit is contained in:
parent
cd81d299ab
commit
bccf437192
1 changed files with 5 additions and 5 deletions
|
|
@ -28,14 +28,14 @@ jobs:
|
|||
|
||||
- name: Configure SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.NAS_SSH_KEY }}" > ~/.ssh/id_deploy
|
||||
chmod 600 ~/.ssh/id_deploy
|
||||
mkdir -p /root/.ssh
|
||||
echo "${{ secrets.NAS_SSH_KEY }}" > /root/.ssh/id_deploy
|
||||
chmod 600 /root/.ssh/id_deploy
|
||||
|
||||
- name: Sync files to NAS
|
||||
run: |
|
||||
rsync -av --delete \
|
||||
-e "ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no" \
|
||||
-e "ssh -i /root/.ssh/id_deploy -o StrictHostKeyChecking=no" \
|
||||
--exclude='.git' \
|
||||
--exclude='.env' \
|
||||
--exclude='data/' \
|
||||
|
|
@ -45,6 +45,6 @@ jobs:
|
|||
|
||||
- name: Restart bot on NAS
|
||||
run: |
|
||||
ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no \
|
||||
ssh -i /root/.ssh/id_deploy -o StrictHostKeyChecking=no \
|
||||
Elewyn@192.168.1.208 \
|
||||
"cd ${{ env.DEPLOY_PATH }} && docker compose down || true && docker compose up --build -d"
|
||||
|
|
|
|||
Loading…
Reference in a new issue