chore: Updated TASKS.md #17
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 Example to FTP | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ftp-deploy | |
| # Never interrupt a deployment while it may be swapping the live directory. | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build library | |
| run: npm run build | |
| - name: Build example | |
| run: npm run build --workspace example | |
| env: | |
| VITE_SITE_URL: https://www.react-query-builder.com/ | |
| - name: Upload example to staging directory | |
| uses: SamKirkland/FTP-Deploy-Action@v4.4.0 | |
| with: | |
| server: ${{ secrets.FTP_HOSTNAME }} | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| protocol: ftps | |
| port: 21 | |
| local-dir: ./example/dist/ | |
| server-dir: /www-new/ | |
| dangerous-clean-slate: true | |
| - name: Activate staged deployment | |
| run: python .github/scripts/swap-ftp-directories.py | |
| env: | |
| FTP_HOSTNAME: ${{ secrets.FTP_HOSTNAME }} | |
| FTP_USERNAME: ${{ secrets.FTP_USERNAME }} | |
| FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} | |
| FTP_PORT: 21 |