From 07ebc6549bf5bedabdb41056f326871faf0882ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= <72651575+BreizhHardware@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:50:25 +0200 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 61e9b02..5b8abe2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -47,13 +47,19 @@ jobs: name: cypress-screenshots path: cypress/screenshots - - name: Copy build directory to server - uses: Dylan700/sftp-upload-action@v1.2.3 + - name: Get changed files + uses: tj-actions/changed-files@v35 with: - server: ${{ secrets.SERVER_HOST }} + since_last_remote_commit: true + separator: "," + files: "./dist/***" + + - name: copy file to server + uses: appleboy/scp-action@v0.1.7 + with: + host: ${{ secrets.SERVER_HOST }} username: ${{ secrets.SERVER_USERNAME }} password: ${{ secrets.SERVER_PASSWORD }} port: ${{ secrets.SERVER_PORT }} - uploads: | - ./dist => /webroot/ - delete: true \ No newline at end of file + source: ${{ steps.changed-files.outputs.all_changed_files }} + target: /webroot/