Merge pull request #26 from marcop135/develop #49
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 production | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: production-deploy | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| name: Build and FTP deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Run tests | |
| run: yarn test | |
| - name: Build | |
| run: yarn build | |
| - name: Sync dist via FTPS | |
| uses: SamKirkland/FTP-Deploy-Action@v4.4.0 | |
| with: | |
| # FTP_HOST must match the CN/SAN on the FTPS server's TLS cert | |
| # (typically the bare shared-hosting hostname), not a vanity FQDN | |
| # like ftp.example.com. With `security: strict`, hostname mismatch | |
| # aborts the deploy. | |
| server: ${{ secrets.FTP_HOST }} | |
| username: ${{ secrets.FTP_USERNAME_PRODUCTION }} | |
| password: ${{ secrets.FTP_PASSWORD_PRODUCTION }} | |
| server-dir: ./ | |
| local-dir: ./dist/ | |
| protocol: ftps | |
| port: 21 | |
| security: strict | |
| dangerous-clean-slate: false |