esbuild added to optionaldependencies (needed on windows) #489
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 Cloudflare Pages | |
| on: | |
| push: | |
| branches: | |
| - demo-deploy | |
| env: | |
| NX_NON_NATIVE_HASHER: true | |
| VITE_API_URL: / | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| deployments: write | |
| name: Publish to Cloudflare Pages | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Test application | |
| run: npm run test | |
| - name: Build application | |
| run: npm run build | |
| - name: copy cloudflare functions | |
| run: cp -r functions dist/apps/vps-web | |
| - name: Publish to Cloudflare Pages | |
| uses: cloudflare/pages-action@v1 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNTID }} | |
| projectName: vps-web | |
| directory: dist/apps/vps-web |