Use jekyll-build-pages action #69
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: Update Cloudflare Worker | |
| on: | |
| push: | |
| branches: main | |
| paths: | |
| - '.github/**' | |
| - '_cf/**' | |
| jobs: | |
| get-workers: | |
| name: Get Cloudflare Workers | |
| runs-on: ubuntu-latest | |
| outputs: | |
| workers: ${{ steps.get-workers.outputs.workers }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Get workers | |
| id: get-workers | |
| run: | | |
| workers=$(find _cf -mindepth 1 -maxdepth 1 -type d | | |
| xargs -n1 basename | jq -MRnc '[inputs]') | |
| echo "workers=$workers" >> $GITHUB_OUTPUT | |
| cloudflare-worker: | |
| name: Deploy Cloudflare Workers | |
| runs-on: ubuntu-latest | |
| needs: get-workers | |
| strategy: | |
| matrix: | |
| worker: ${{ fromJSON(needs.get-workers.outputs.workers) }} | |
| include: | |
| - worker: netlify-deployment-status | |
| secrets: | | |
| NETLIFY_GH_TOKEN | |
| NETLIFY_JWS_SECRET | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Deploy Cloudflare Worker (${{ matrix.worker }}) | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CF_API_TOKEN }} | |
| accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
| workingDirectory: _cf/${{ matrix.worker }} | |
| secrets: ${{ matrix.secrets }} | |
| env: | |
| NETLIFY_GH_TOKEN: ${{ secrets.NETLIFY_GH_TOKEN }} | |
| NETLIFY_JWS_SECRET: ${{ secrets.NETLIFY_JWS_SECRET }} |