Chore(runner): zip files before sending them of

This commit is contained in:
Pieter Vander Vennet 2024-12-09 21:31:23 +01:00
parent 93bbd5d0b8
commit eb248a3edc

View file

@ -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/"