From 9529e0571feab1842ee16327d9a23f8a3658f7c1 Mon Sep 17 00:00:00 2001 From: Kailas Mahavarkar <66670953+KailasMahavarkar@users.noreply.github.com> Date: Mon, 20 Apr 2026 16:20:16 +0530 Subject: [PATCH] ci: add Cloudflare Pages deploy workflow for website/ Triggers on push to main when website/** or the workflow itself changes. Builds the Docusaurus site with bun (website already has bun.lock tracked), then wrangler-action deploys to the existing Cloudflare Pages project `nitrogen-orkait` on the main branch. Requires two repo secrets set by the maintainer: CLOUDFLARE_API_TOKEN - scoped to pages:edit for nitrogen-orkait CLOUDFLARE_ACCOUNT_ID - 7e3d505f11dfc7471e1279062cc7de72 (also safe to hardcode since account IDs are not secret, but convention puts it in secrets). Verified local `bun run build` produces website/build without error. Deploy line is the same recipe documented in the project CLAUDE.md. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/deploy-website.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/deploy-website.yml diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml new file mode 100644 index 0000000..0da94f0 --- /dev/null +++ b/.github/workflows/deploy-website.yml @@ -0,0 +1,39 @@ +name: Deploy Website + +on: + push: + branches: [main] + paths: + - 'website/**' + - '.github/workflows/deploy-website.yml' + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + deployments: write + steps: + - uses: actions/checkout@v4 + + - name: Set up Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + working-directory: website + run: bun install --frozen-lockfile + + - name: Build Docusaurus site + working-directory: website + run: bun run build + + - name: Deploy to Cloudflare Pages + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: pages deploy website/build --project-name=nitrogen-orkait --branch=main