name: Deploy blog production Worker on: push: branches: [main] paths: - .gitea/workflows/production-blog.yml - astro.config.mjs - package.json - package-lock.json - public/** - schemas/** - scripts/** - sites.json - sites/blog/** - src/** - wrangler/blog.production.jsonc workflow_dispatch: jobs: production: name: Build and deploy blog.3031023.xyz production runs-on: ubuntu-latest permissions: contents: read env: SITE_KEY: blog DEPLOY_ENV: production ASTRO_TELEMETRY_DISABLED: '1' steps: - name: Checkout source uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - name: Use Node 22 uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: 22 cache: npm cache-dependency-path: package-lock.json - name: Install locked dependencies run: npm ci --prefer-offline --no-audit --no-fund - name: Validate and build production blog run: npm run build:site - name: Verify production blog output run: npm run verify:build - name: Verify SloanOps account target env: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} run: test "$CLOUDFLARE_ACCOUNT_ID" = "9894ee8f9432da1018e0f3861d86dedb" - name: Deploy Worker without custom domains or routes run: npx wrangler deploy --config wrangler/blog.production.jsonc env: CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}