Merge pull request #5 from cloudflare/fix/worker-build #5
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 HTML Examples | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'html-examples/**' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| name: Deploy HTML Examples | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'pnpm' | |
| cache-dependency-path: '**/pnpm-lock.yaml' | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: ./ | |
| - name: Build | |
| run: pnpm run build | |
| working-directory: ./html-examples | |
| - name: Deploy to Cloudflare Pages | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| wranglerVersion: '4.42.1' | |
| command: pages deploy ./dist --project-name=realtimekit-html-examples | |
| workingDirectory: ./html-examples |