@@ -28,7 +28,7 @@ jobs:
|
|||||||
- name: Install deployment tools
|
- name: Install deployment tools
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
- name: Configure SSH
|
||||||
env:
|
env:
|
||||||
@@ -46,6 +46,8 @@ jobs:
|
|||||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||||
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
|
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
|
||||||
run: |
|
run: |
|
||||||
rsync -az --delete \
|
set -o pipefail
|
||||||
-e "ssh -i $HOME/.ssh/deploy_key -o IdentitiesOnly=yes" \
|
tar -C dist -czf - . | \
|
||||||
dist/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/"
|
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