29 lines
904 B
YAML
29 lines
904 B
YAML
name: Deploy to Cloudflare Pages
|
|
|
|
# Preview deployments are created for pushes to any non-master branch.
|
|
# Pushing to master creates the production deployment (served on custom domain).
|
|
# Non-master branches get a unique preview URL for client review.
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
# These will be replaced during site creation
|
|
CLOUDFLARE_PROJECT_NAME: birdops
|
|
CLOUDFLARE_CUSTOM_DOMAIN: bird.ops
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy to Cloudflare Pages
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
- name: Deploy to Cloudflare Pages (Direct Upload)
|
|
run: npx wrangler pages deploy . --project-name=${{ env.CLOUDFLARE_PROJECT_NAME }} --branch=${GITHUB_REF#refs/heads/}
|
|
env:
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|