Strengthen project signals and homepage links #24
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: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: cloudflare-pages-production | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| steps: | |
| - name: Check deployment credentials | |
| if: ${{ env.CLOUDFLARE_API_TOKEN == '' }} | |
| run: echo "Cloudflare deployment skipped because CLOUDFLARE_API_TOKEN is not configured." | |
| - name: Check out repository | |
| if: ${{ env.CLOUDFLARE_API_TOKEN != '' }} | |
| uses: actions/checkout@v4 | |
| - name: Run SEO regression checks | |
| if: ${{ env.CLOUDFLARE_API_TOKEN != '' }} | |
| run: node scripts/seo-regression.mjs | |
| - name: Deploy production site | |
| if: ${{ env.CLOUDFLARE_API_TOKEN != '' }} | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: 764113b33c73a4d7ee914c828d7c1fa6 | |
| wranglerVersion: "4.105.0" | |
| command: pages deploy . --project-name=us-address-generator --branch=main |