Repository navigation
Bump marked from 14.1.4 to 18.0.5 in /worker #129
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 Worker | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'worker/**' | |
| - '.github/workflows/deploy-worker.yml' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'worker/**' | |
| - '.github/workflows/deploy-worker.yml' | |
| jobs: | |
| deploy: | |
| name: Deploy to Cloudflare Workers | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| deployments: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: worker/package-lock.json | |
| - name: Install dependencies | |
| working-directory: worker | |
| run: npm ci | |
| - name: Deploy Worker (production) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| workingDirectory: worker | |
| command: deploy |