From 13e37fa3e0d3b63c1b231f66dc1a587fc7192042 Mon Sep 17 00:00:00 2001 From: Formsmith <214276465+Formsmith746@users.noreply.github.com> Date: Fri, 31 Jul 2026 19:06:17 +0300 Subject: [PATCH] Add automatic Sanity content deployment workflow --- .github/workflows/sanity-content-deploy.yml | 44 +++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/sanity-content-deploy.yml diff --git a/.github/workflows/sanity-content-deploy.yml b/.github/workflows/sanity-content-deploy.yml new file mode 100644 index 0000000..8cf13c5 --- /dev/null +++ b/.github/workflows/sanity-content-deploy.yml @@ -0,0 +1,44 @@ +name: Deploy Sanity content + +on: + repository_dispatch: + types: + - sanity-content-change + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: sketchforge-production-content + cancel-in-progress: false + +jobs: + deploy: + name: Rebuild and deploy SketchForge + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Checkout production source + uses: actions/checkout@v4 + with: + ref: production-static + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Build static website with current Sanity content + run: npm run export + + - name: Deploy to Cloudflare Workers + run: npx wrangler deploy -c wrangler.jsonc + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}