Improve the tidy up step of the deployment
This commit is contained in:
parent
761a32806a
commit
35f30fa581
1 changed files with 2 additions and 3 deletions
5
.github/workflows/deploy.yml
vendored
5
.github/workflows/deploy.yml
vendored
|
@ -138,6 +138,5 @@ jobs:
|
|||
username: ${{ secrets.DEPLOYMENT_USER }}
|
||||
key: ${{ secrets.DEPLOYMENT_KEY }}
|
||||
script: |
|
||||
cd ${{ env.releasesDir }}
|
||||
ls -dt ${{ env.releasesDir }}/* | tail -n +4 | xargs -d "\n" sudo chown -R ${{ secrets.DEPLOYMENT_USER }}:${{ secrets.DEPLOYMENT_USER }} ./bootstrap/cache;
|
||||
ls -dt ${{ env.releasesDir }}/* | tail -n +4 | xargs -d "\n" rm -rf;
|
||||
fd '.+' ${{ env.releasesDir }} -d 1 | head -n -3 | xargs -d "\n" -I'{}' sudo chown -R ${{ secrets.DEPLOYMENT_USER }}:${{ secrets.DEPLOYMENT_USER }} {}/bootstrap/cache;
|
||||
fd '.+' ${{ env.releasesDir }} -d 1 | head -n -3 | xargs -d "\n" -I'{}' rm -rf {};
|
||||
|
|
Loading…
Add table
Reference in a new issue