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: | for attempt in 1 2 3; do if bun install --frozen-lockfile; then exit 0 fi if [[ "$attempt" = "3" ]]; then exit 1 fi sleep "$((15 * attempt))" done - 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 }}