From d745671e3688b2b0fad29ecbfa785d7436486de0 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 8 Jan 2025 18:39:34 +0100 Subject: [PATCH] Actions: remove directory before unzipping to deal with eventual leftovers --- .forgejo/workflows/deploy_hosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy_hosted.yml b/.forgejo/workflows/deploy_hosted.yml index 2c6f058b0..c7520a94a 100644 --- a/.forgejo/workflows/deploy_hosted.yml +++ b/.forgejo/workflows/deploy_hosted.yml @@ -61,7 +61,7 @@ jobs: 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/ && rm ${{ github.ref_name }}.zip" + 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"