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

48 lines
1.3 KiB
YAML

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@v4
- name: Use Node 22
uses: https://github.com/actions/setup-node@v4
with:
node-version: 22
- 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: 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 }}