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/