From 4b564f59231df37f68a39e1743ba24b361f019c9 Mon Sep 17 00:00:00 2001 From: nsheff Date: Tue, 16 Jun 2026 14:25:55 -0400 Subject: [PATCH 1/3] Add CI workflow to push-deploy ui/ as bedhost-ui worker --- .github/workflows/deploy-ui.yml | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/deploy-ui.yml diff --git a/.github/workflows/deploy-ui.yml b/.github/workflows/deploy-ui.yml new file mode 100644 index 00000000..718dcc97 --- /dev/null +++ b/.github/workflows/deploy-ui.yml @@ -0,0 +1,48 @@ +name: Deploy UI to Cloudflare Workers + +on: + push: + branches: + - master + paths: + - 'ui/**' + workflow_dispatch: + inputs: null + +jobs: + deploy: + name: Build and deploy ui/ to Cloudflare Workers + runs-on: ubuntu-latest + defaults: + run: + working-directory: ui + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20' + + # NOTE: ui/ currently has NO committed package-lock.json, so `npm ci` + # (and npm caching keyed on the lockfile) cannot be used yet. Commit a + # ui/package-lock.json and then switch this to `npm ci` + enable + # `cache: npm` / `cache-dependency-path: ui/package-lock.json` above. + - name: Install dependencies + run: npm install + + - name: Build + env: + # Production BEDbase API base. The app reads import.meta.env.VITE_API_BASE + # at build time (see ui/src/vite-env.d.ts, ui/src/const.ts). + VITE_API_BASE: https://api.bedbase.org/v1 + run: npm run build + + - name: Deploy to Cloudflare Workers + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + workingDirectory: ui + command: deploy From e7be775b6f11a2c6bc4123b589001c662904326a Mon Sep 17 00:00:00 2001 From: Nathan Sheffield Date: Tue, 16 Jun 2026 14:35:39 -0400 Subject: [PATCH 2/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/deploy-ui.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-ui.yml b/.github/workflows/deploy-ui.yml index 718dcc97..8d9376cf 100644 --- a/.github/workflows/deploy-ui.yml +++ b/.github/workflows/deploy-ui.yml @@ -9,6 +9,9 @@ on: workflow_dispatch: inputs: null +permissions: + contents: read + jobs: deploy: name: Build and deploy ui/ to Cloudflare Workers From 9b8aaf412397bfe332f04adc128fbca86d474934 Mon Sep 17 00:00:00 2001 From: nsheff Date: Tue, 16 Jun 2026 14:41:53 -0400 Subject: [PATCH 3/3] Add concurrency guard (other half of Copilot review) --- .github/workflows/deploy-ui.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy-ui.yml b/.github/workflows/deploy-ui.yml index 8d9376cf..58fcf561 100644 --- a/.github/workflows/deploy-ui.yml +++ b/.github/workflows/deploy-ui.yml @@ -12,6 +12,10 @@ on: permissions: contents: read +concurrency: + group: deploy-ui + cancel-in-progress: true + jobs: deploy: name: Build and deploy ui/ to Cloudflare Workers