Skip to content
This repository was archived by the owner on Oct 14, 2026. It is now read-only.

Add Vercel deployment workflows (docs) - #1333

Merged
gantoreno merged 16 commits into
masterfrom
gro-956-create-vercel-deployments-in-marketing-docs
Sep 17, 2026
Merged

gantoreno merged 16 commits into
masterfrom
gro-956-create-vercel-deployments-in-marketing-docs

Conversation

@gantoreno

Copy link
Copy Markdown
Contributor

Fixes GRO-956

  • Adds CI workflows for Vercel:
    • Setting up & tearing down preview environments
    • Deploying to production

@linear

linear Bot commented Sep 15, 2026

Copy link
Copy Markdown

GRO-956

@gantoreno
gantoreno requested a review from a team September 15, 2026 14:42
@metabase metabase deleted a comment from github-actions Bot Sep 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

The deployments were removed when this pull request closed. Reopening it deploys again at the same address.

@bpander bpander left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looking really good. Found only a couple blocking issues.

Comment thread vercel.ts Outdated
buildCommand: "bun run build",
outputDirectory: "_site",
cleanUrls: true,
trailingSlash: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this causes quite a few 404s. Some links are defined in the docs source files as relative, e.g. in [metabase]/docs/README.md there's [cloud vs self-hosting](./cloud/cloud-vs-self-hosting.md).

In production, because /docs/latest/ has a trailing slash, the href resolves to /docs/latest/cloud/cloud-vs-self-hosting which is correct.

But without the trailing slash, it resolves to /docs/cloud/cloud-vs-self-hosting which 404s.

I think there are quite a few relative links. Do we actually need to force it one way or the other?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I believe there's opportunity for consistency & unification here. I changed these settings but I believe I missed updating the Astro build format to avoid trailing slashes

My inclination would be to remove trailing slashes given that there's only 4 out of 489 URLs listed on the sitemap which end with a trailing slash, the majority seems to not have it, so maybe that's a tradeoff worth taking for consistency purposes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT: I'll hold that thought, the fix wasn't quite as small as I wanted. Went with the simples which is just keeping the existing behavior in prod

Comment thread vercel.ts
headers: [
{
source: "/",
has: [{ type: "host", value: { suf: ".vercel.app" } }],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this will leak into production since docs doesn't have a custom domain. I think you can just use pre instead though since we're just targeting PR envs, e.g.

pre: `${PROJECT_NAME}-pr-`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, you're right. The underlying proxy from the production marketing deployment will still hit the .vercel.app domain

One thing I remembered we can do is request header deletion in the marketing project's vercel.ts, something like:

{
  src: "^/docs(?:/.*)?$",
  has: [{ type: "host", value: "metabase.com" }],
  transforms: [
    {
      type: "response.headers",
      op: "delete",
      target: { key: "x-robots-tag" },
    },
  ],
  continue: true,
}

Essentially handing control over to marketing, which owns the domain, "unless this app is being accessed via its intended host & path, it won't index".

The pre rule works too, I guess it's a bit too paranoid but it'll still leaves metabase-docs.vercel.app open to being indexed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah I like that option more since it's simple and reasonable and it'd handle metabase-docs.vercel.app too. Good thinking.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gantoreno
gantoreno requested a review from bpander September 17, 2026 18:34

@bpander bpander left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

▲▲▲

@gantoreno
gantoreno merged commit 22a0151 into master Sep 17, 2026
6 checks passed
@gantoreno
gantoreno deleted the gro-956-create-vercel-deployments-in-marketing-docs branch September 17, 2026 18:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants