From dbaff19b5be6630529ea5633cad5b6a92b5a7a64 Mon Sep 17 00:00:00 2001 From: Bennett Schwartz Date: Thu, 30 Apr 2026 23:09:09 -0400 Subject: [PATCH 1/2] fix(ci): make Go formatting check actionable --- .github/workflows/ci.yml | 7 ++++++- pkg/ingestion/capture_test.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e07c0d9..0cf69b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,7 +114,12 @@ jobs: exit 1 - name: Check formatting - run: test -z "$(gofmt -l .)" + run: | + UNFORMATTED="$(find . -name '*.go' -not -path './.git/*' -print0 | xargs -0 gofmt -l)" + if [ -n "$UNFORMATTED" ]; then + echo "$UNFORMATTED" + exit 1 + fi - name: Check go mod tidy run: | diff --git a/pkg/ingestion/capture_test.go b/pkg/ingestion/capture_test.go index 6418609..8f2815b 100644 --- a/pkg/ingestion/capture_test.go +++ b/pkg/ingestion/capture_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/BennettSchwartz/membrane/pkg/schema" - sqlitestore "github.com/BennettSchwartz/membrane/pkg/storage/sqlite" "github.com/BennettSchwartz/membrane/pkg/storage" + sqlitestore "github.com/BennettSchwartz/membrane/pkg/storage/sqlite" ) type stubInterpreter struct { From b32cabc195b75d55becaf8dc3adf7e82f437de85 Mon Sep 17 00:00:00 2001 From: Bennett Schwartz Date: Thu, 30 Apr 2026 23:09:12 -0400 Subject: [PATCH 2/2] chore(docs): deploy docs with Cloudflare Workers --- .github/workflows/docs-deploy.yml | 51 +++++++++++++++++++++++++++++++ README.md | 12 +++++--- docusaurus.config.js | 2 +- wrangler.jsonc | 6 ++++ 4 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/docs-deploy.yml diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml new file mode 100644 index 0000000..ac0e6a7 --- /dev/null +++ b/.github/workflows/docs-deploy.yml @@ -0,0 +1,51 @@ +name: Cloudflare Docs + +on: + push: + branches: [master] + paths: + - "docs/**" + - "src/**" + - "static/**" + - "docusaurus.config.js" + - "sidebars.js" + - "package.json" + - "package-lock.json" + - "wrangler.jsonc" + - ".github/workflows/docs-deploy.yml" + workflow_dispatch: + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: npm + cache-dependency-path: package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Build docs + run: npm run docs:build + + - name: Deploy docs to Cloudflare Workers + if: env.CLOUDFLARE_API_TOKEN != '' + run: npx wrangler deploy + + - name: Skip deploy without Cloudflare token + if: env.CLOUDFLARE_API_TOKEN == '' + run: | + echo "::notice::Set CLOUDFLARE_API_TOKEN as a repository secret to enable automatic docs deployment." diff --git a/README.md b/README.md index 3998b23..ab176f7 100644 --- a/README.md +++ b/README.md @@ -278,7 +278,8 @@ are useful, instead of forcing tool calls in the harness. ## Documentation -The docs site lives in [docs](docs) and is built with Docusaurus. +The docs site lives in [docs](docs), is built with Docusaurus, and is deployed +to Cloudflare Workers at . ```bash npm install @@ -289,9 +290,12 @@ npm run docs:build npm run docs:deploy ``` -Cloudflare configuration is in [wrangler.jsonc](wrangler.jsonc). Sidebar and -theme configuration live in [sidebars.js](sidebars.js) and -[docusaurus.config.js](docusaurus.config.js). +Cloudflare configuration is in [wrangler.jsonc](wrangler.jsonc). The GitHub +Actions deploy workflow runs when docs files change and deploys when +`CLOUDFLARE_API_TOKEN` is present as a repository secret. The +`membrane.gustycube.com` DNS record must be proxied through Cloudflare for the +Worker route to receive production traffic. Sidebar and theme configuration live +in [sidebars.js](sidebars.js) and [docusaurus.config.js](docusaurus.config.js). ## API Surface diff --git a/docusaurus.config.js b/docusaurus.config.js index 1f6ae34..4f162ec 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -3,7 +3,7 @@ const config = { title: "Membrane", tagline: "A selective learning and memory substrate for LLM and agentic systems.", - url: process.env.DOCS_SITE_URL ?? "https://membrane-docs.bennettschwartz32.workers.dev", + url: process.env.DOCS_SITE_URL ?? "https://membrane.gustycube.com", baseUrl: "/", organizationName: "BennettSchwartz", projectName: "membrane", diff --git a/wrangler.jsonc b/wrangler.jsonc index bb5d6f3..ba12c8e 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -3,6 +3,12 @@ "name": "membrane-docs", "account_id": "776e99cad6263022ce616ccd9c25663e", "workers_dev": true, + "routes": [ + { + "pattern": "membrane.gustycube.com/*", + "zone_name": "gustycube.com" + } + ], "compatibility_date": "2026-04-30", "assets": { "directory": "./build",