Exclude logs from rsync delete #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Apache server | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| build-deploy: | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install & Build | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Deploy | |
| run: | | |
| rsync -avzr --delete --exclude 'logs/' dist/ /var/www/southgreen/ |