Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(docs): deploy Vercel site only after releases

vastsa19f988cdd8de
diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml
new file mode 100644
index 000000000..5c23ab956
--- /dev/null
+++ b/.github/workflows/docs-deploy.yml
@@ -0,0 +1,58 @@
+name: Docs deployment
+
+# Vercel Git deployments are disabled in docs/vercel.json. The documentation
+# site is published from the exact release tag instead of every branch push.
+
+on:
+ release:
+ types: [published]
+ workflow_dispatch:
+ inputs:
+ ref:
+ description: 'Git ref to deploy (normally a release tag)'
+ required: true
+ type: string
+
+permissions:
+ contents: read
+
+concurrency:
+ group: docs-deploy-${{ github.event.release.tag_name || inputs.ref }}
+ cancel-in-progress: false
+
+env:
+ VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
+ VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
+
+jobs:
+ deploy:
+ name: Deploy documentation
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ steps:
+ - name: Check out release ref
+ uses: actions/checkout@v7
+ with:
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.event.release.tag_name }}
+ fetch-depth: 0
+
+ - name: Install Vercel CLI
+ run: npm install --global [email protected]
+
+ - name: Pull Vercel production configuration
+ working-directory: docs
+ run: vercel pull --yes --environment=production --token="$VERCEL_TOKEN"
+ env:
+ VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
+
+ - name: Build the documentation deployment
+ working-directory: docs
+ run: vercel build --prod --token="$VERCEL_TOKEN"
+ env:
+ VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
+
+ - name: Publish the documentation deployment
+ working-directory: docs
+ run: vercel deploy --prebuilt --prod --token="$VERCEL_TOKEN"
+ env:
+ VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
diff --git a/docs/spec/06-delivery/06-release-runbook.md b/docs/spec/06-delivery/06-release-runbook.md
index 9d3cf8373..8fa18205f 100644
--- a/docs/spec/06-delivery/06-release-runbook.md
+++ b/docs/spec/06-delivery/06-release-runbook.md
@@ -279,7 +279,22 @@ assembles the GitHub Release. The Linux runner also copies
exact archive used by the Linux installers for downstream repackaging with a
system Electron.
-### 4.4 CNB mirror trigger
+### 4.4 Documentation site deployment
+
+The `pi-desktop-docs` Vercel project is published only from a published GitHub
+Release ref.
+`docs/vercel.json` disables Vercel Git auto-deployments, so pushes to `main`,
+release branches, and pull requests do not create documentation deployments or
+Vercel bot comments. `.github/workflows/docs-deploy.yml` runs after the release
+workflow publishes a GitHub Release, checks out its exact tag, and deploys the
+production site with the Vercel CLI.
+
+The workflow requires the repository secrets `VERCEL_ORG_ID`,
+`VERCEL_PROJECT_ID`, and `VERCEL_TOKEN`. Manual runs are available only when a
+ref is supplied explicitly, for recovery or a deliberate documentation
+republish.
+
+### 4.5 CNB mirror trigger
After `softprops/action-gh-release` publishes or updates a GitHub Release,
`.github/workflows/mirror-to-cnb.yml` starts the CNB pipeline at
@@ -302,7 +317,7 @@ Re-running the workflow for the same tag is safe if the CNB pipeline is
idempotent. It does not rebuild desktop artifacts and does not change
electron-updater feeds.
-### 4.5 GitHub Actions secrets for macOS signing
+### 4.6 GitHub Actions secrets for macOS signing
Create these under GitHub → repository `vastsa/PI-Desktop` → Settings →
Secrets and variables → Actions. Never commit the p12, password, Apple ID, or
@@ -325,7 +340,7 @@ base64 -i developer-id-application.p12 | pbcopy
On Linux use `base64 -w0 developer-id-application.p12`. Files that must never
enter git: `*.p12`, `*.cer`, `*.p8`, `*.mobileprovision`.
-### 4.6 macOS signing observability and timeouts
+### 4.7 macOS signing observability and timeouts
`electron-builder` prints one line before signing — `signing
file=release/mac-arm64/PI-Desktop.app platform=darwin type=distribution
diff --git a/docs/vercel.json b/docs/vercel.json
index 85f89d2cd..4f5cea75f 100644
--- a/docs/vercel.json
+++ b/docs/vercel.json
@@ -4,5 +4,8 @@
"installCommand": "npx --yes [email protected] install",
"buildCommand": "npx --yes [email protected] build",
"outputDirectory": ".vitepress/dist",
- "cleanUrls": true
+ "cleanUrls": true,
+ "git": {
+ "deploymentEnabled": false
+ }
}