forked from MapComplete/MapComplete
Chore: deploy script now cleans up files
This commit is contained in:
parent
f40ed2dd71
commit
fb2fb64bdf
1 changed files with 4 additions and 1 deletions
|
@ -52,7 +52,7 @@ jobs:
|
||||||
|
|
||||||
- name: Zipping dist file
|
- name: Zipping dist file
|
||||||
run: |
|
run: |
|
||||||
mv -f dist /tmp/${{ github.ref_name }}
|
mv dist /tmp/${{ github.ref_name }}
|
||||||
cd /tmp
|
cd /tmp
|
||||||
zip ${{ github.ref_name }}.zip -r ${{ github.ref_name }}/*
|
zip ${{ github.ref_name }}.zip -r ${{ github.ref_name }}/*
|
||||||
cd -
|
cd -
|
||||||
|
@ -60,6 +60,9 @@ jobs:
|
||||||
- name: uploading file
|
- name: uploading file
|
||||||
run: scp /tmp/${{ github.ref_name }}.zip hetzner:/root/staging/
|
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
|
- 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"
|
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"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue