Chore: deploy script now cleans up files

This commit is contained in:
Pieter Vander Vennet 2025-03-17 02:37:31 +01:00
parent f40ed2dd71
commit fb2fb64bdf

View file

@ -52,7 +52,7 @@ jobs:
- name: Zipping dist file
run: |
mv -f dist /tmp/${{ github.ref_name }}
mv dist /tmp/${{ github.ref_name }}
cd /tmp
zip ${{ github.ref_name }}.zip -r ${{ github.ref_name }}/*
cd -
@ -60,6 +60,9 @@ jobs:
- name: uploading file
run: scp /tmp/${{ github.ref_name }}.zip hetzner:/root/staging/
- name: cleanup files
run: rm /tmp/${{ github.ref_name }}.zip && rm -rf /tmp/${{ github.ref_name }}/
- name: unzipping remote file
run: ssh hetzner "cd /root/staging && rm -rf ${{ github.ref_name }} && unzip ${{ github.ref_name }}.zip && rm -rf /root/public/${{ github.ref_name }} && mv /root/staging/${{ github.ref_name }}/ /root/public/ && rm ${{ github.ref_name }}.zip"