Files
3031023-xyz-public/.gitea/workflows/production-candidate.yml
T

48 lines
1.3 KiB
YAML

name: Deploy primary production Worker
on:
push:
branches: [main]
paths:
- .gitea/workflows/production-candidate.yml
- astro.config.mjs
- package.json
- package-lock.json
- public/**
- schemas/**
- scripts/**
- sites.json
- sites/www/**
- src/**
- wrangler/www.production.jsonc
workflow_dispatch:
jobs:
production:
name: Build and deploy 3031023.xyz production
runs-on: ubuntu-latest
permissions:
contents: read
env:
SITE_KEY: www
DEPLOY_ENV: production
ASTRO_TELEMETRY_DISABLED: '1'
steps:
- name: Checkout source
uses: https://github.com/actions/checkout@v4
- name: Use Node 22
uses: https://github.com/actions/setup-node@v4
with:
node-version: 22
- name: Install locked dependencies
run: npm ci
- name: Validate and build production site
run: npm run build:site
- name: Verify production output
run: npm run verify:build
- name: Deploy Worker without custom domains or routes
run: npx wrangler deploy --config wrangler/www.production.jsonc
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}