@@ -28,7 +28,7 @@ jobs:
|
||||
- name: Install deployment tools
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --yes --no-install-recommends openssh-client rsync
|
||||
sudo apt-get install --yes --no-install-recommends openssh-client
|
||||
|
||||
- name: Configure SSH
|
||||
env:
|
||||
@@ -46,6 +46,8 @@ jobs:
|
||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
|
||||
run: |
|
||||
rsync -az --delete \
|
||||
-e "ssh -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes" \
|
||||
dist/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/"
|
||||
set -o pipefail
|
||||
tar -C dist -czf - . | \
|
||||
ssh -T -i "$HOME/.ssh/deploy_key" -o IdentitiesOnly=yes \
|
||||
"$DEPLOY_USER@$DEPLOY_HOST" \
|
||||
"find '$DEPLOY_PATH' -mindepth 1 -maxdepth 1 -exec rm -rf -- {} + && tar -xzf - -C '$DEPLOY_PATH'"
|
||||
|
||||
Reference in New Issue
Block a user