Merge pull request #17 from cwandev/refactor/code-block #68
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 www | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'apps/www/**' | |
| - 'packages/elements/**' | |
| - 'packages/examples/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| deployments: write | |
| pull-requests: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| name: Publish www (Nuxt SSR) to Cloudflare Workers | |
| concurrency: | |
| group: deploy-www-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup (Install Node & pnpm) | |
| uses: ./.github/actions/setup | |
| - name: Install dependencies | |
| run: pnpm i --frozen-lockfile | |
| - name: Build www | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=6144 | |
| run: pnpm build:www | |
| - name: Publish to Cloudflare Workers via Wrangler | |
| working-directory: apps/www | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| run: | | |
| npx wrangler@4 deploy --config wrangler.toml |