From eb248a3edc54faa38fd59de9c1f7d6dd6546b6cf Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 9 Dec 2024 21:31:23 +0100 Subject: [PATCH] Chore(runner): zip files before sending them of --- .github/workflows/deploy_hosted.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy_hosted.yml b/.github/workflows/deploy_hosted.yml index f71225bf0..4728a24fd 100644 --- a/.github/workflows/deploy_hosted.yml +++ b/.github/workflows/deploy_hosted.yml @@ -55,11 +55,14 @@ jobs: npm run clean:tests shell: bash - - name: Upload artefact - run: | - ssh hetzner "mkdir -p /root/staging/${{ github.ref_name }}" - scp -r dist/* hetzner:/root/staging/${{ github.ref_name }}/ - ssh hetzner "rm -rf /root/public/${{ github.ref_name }} && mv /root/staging/${{ github.ref_name }}/ /root/public/" - + - name: Zipping dist file + run: zip ${{ github.ref_name }}.zip -r dist/ + + - name: uploading file + run: scp ${{ github.ref_name }}.zip hetzner:/root/staging/ + + - name: unzipping remote file + run: ssh hetzner "cd /root/staging && unzip ${{ github.ref_name }}.zip && rm -rf /root/public/${{ github.ref_name }} && mv /root/staging/${{ github.ref_name }}/ /root/public/" +