add rsync to workflow
All checks were successful
/ Build (push) Successful in 34s

This commit is contained in:
log101 2024-05-14 16:22:18 +00:00
parent ffeb0791c8
commit 2576dd04bf

View File

@ -44,15 +44,21 @@ jobs:
run: | run: |
${{ steps.detect-package-manager.outputs.runner }} astro build ${{ steps.detect-package-manager.outputs.runner }} astro build
working-directory: ${{ env.BUILD_PATH }} working-directory: ${{ env.BUILD_PATH }}
- name: Transfer dist folder - name: Deploy to my server
run: scp -r ./dist log101@log101.dev:/home/log101/ uses: up9cloud/action-rsync@master
- name: executing remote ssh commands using ssh key env:
uses: appleboy/ssh-action@v1.0.3 HOST: ${{ secrets.HOST }}
with: KEY: ${{ secrets.KEY }}
host: ${{ secrets.HOST }} TARGET: ${{ secrets.DESTINATION_FOLDER }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }} VERBOSE: true
port: ${{ secrets.PORT }} USER: ${{ secrets.USERNAME }}
script: | ARGS: -az --exclude=/.git/
whoami SSH_ARGS: '-p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
ls -l ${{ env.BUILD_PATH }}/dist SOURCE: ./dist/
PRE_SCRIPT: |
echo start at:
date -u
POST_SCRIPT: "echo done at: && date -u"