Files
edgeever/.github/workflows/deploy-site.yml
T

52 lines
1.3 KiB
YAML

name: Deploy EdgeEver Site
on:
push:
branches:
- main
paths:
- "apps/site/**"
- "README.md"
- "docs/**"
- "package.json"
- "bun.lock"
- ".github/workflows/deploy-site.yml"
workflow_dispatch:
permissions:
contents: read
deployments: write
concurrency:
group: edgeever-site-production
cancel-in-progress: true
jobs:
deploy:
# The official site is maintained by the upstream repository only. Product
# deployments and downstream self-hosted instances do not need Cloudflare Pages.
if: github.repository == 'tianma-if/edgeever'
name: Deploy Cloudflare Pages
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build site
run: bun run build:site
- name: Deploy site
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy apps/site/dist --project-name=edgeever-official
gitHubToken: ${{ secrets.GITHUB_TOKEN }}