diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ec3ee3..1ba2f0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,11 +44,16 @@ jobs: run: | sudo systemctl stop portfolio - sudo find /srv/portfolio/ -mindepth 1 ! -regex '^/srv/portfolio/media.*' ! -name '.git' ! -name '.env' ! -name 'log' ! -name 'tmp' -exec rm -rf {} + + sudo find /srv/portfolio/ -mindepth 1 \ + ! -path '/srv/portfolio/media*' \ + ! -path '/srv/portfolio/node_modules*' \ + ! -name '/srv/portfolio/.git*' \ + ! -name '.env' \ + ! -name 'log' \ + ! -name 'tmp' -exec rm -rf {} + - sudo rsync -av /home/gh-runner/actions-runner/_work/portfolio/portfolio/ /srv/portfolio/ + sudo rsync -av --exclude 'node_modules' --exclude 'media' --exclude '.env' --exclude '.git' --exclude 'log' --exclude 'tmp' /home/gh-runner/actions-runner/_work/portfolio/portfolio/ /srv/portfolio/ cd /srv/portfolio pnpm install sudo systemctl start portfolio -