File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,10 +48,19 @@ jobs:
4848 echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> "$GITHUB_ENV"
4949 echo "key_path=$key_file" >> "$GITHUB_OUTPUT"
5050
51+ - name : Fix permissions before sync
52+ env :
53+ ROOT_USER : ${{ secrets.DEPLOY_SSH_ROOT_USER }}
54+ ROOT_PASS : ${{ secrets.DEPLOY_SSH_ROOT_PASSWORD }}
55+ run : |
56+ ssh -o StrictHostKeyChecking=no \
57+ "${DEPLOY_SSH_USER}@${DEPLOY_SSH_HOST}" \
58+ "echo '$ROOT_PASS' | su -c 'chown -R ${DEPLOY_SSH_USER}:${DEPLOY_SSH_USER} ${DEPLOY_TARGET_PATH}' '$ROOT_USER'"
59+
5160 - name : Sync repository to server
5261 run : |
5362 ssh -o StrictHostKeyChecking=no "${DEPLOY_SSH_USER}@${DEPLOY_SSH_HOST}" "mkdir -p '${DEPLOY_TARGET_PATH}'"
54- rsync -az --delete --exclude '.git' \
63+ rsync -az --delete --exclude '.git' --exclude 'bot/data' \
5564 -e "ssh -o StrictHostKeyChecking=no" \
5665 ./ "${DEPLOY_SSH_USER}@${DEPLOY_SSH_HOST}:${DEPLOY_TARGET_PATH}/"
5766
You can’t perform that action at this time.
0 commit comments