diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 04df74f36a56..6d06a61f4f85 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -31,7 +31,7 @@
--
+-
### Related issues
diff --git a/.gitignore b/.gitignore
index 7ed300d410e4..1b1b12ba48e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,8 +27,8 @@
*.sublime-workspace
nbproject
Thumbs.db
-# Local Netlify folder
-.netlify
+# Local Vercel folder
+.vercel
# Komodo
.komodotools
diff --git a/README.md b/README.md
index b8062277d335..596c675f90f0 100644
--- a/README.md
+++ b/README.md
@@ -173,11 +173,11 @@ See [the Releases section of our GitHub project](https://github.com/twbs/bootstr
## Thanks
-
-
+
+
-Thanks to [Netlify](https://www.netlify.com/) for providing us with Deploy Previews!
+Thanks to [Vercel](https://vercel.com/) for providing us with Preview Deployments!
## Sponsors
diff --git a/package.json b/package.json
index 94b1b47443c6..cef8a61f0f32 100644
--- a/package.json
+++ b/package.json
@@ -112,7 +112,7 @@
"release-zip-examples": "node build/zip-examples.mjs",
"dist": "npm-run-all --aggregate-output --parallel css js",
"test": "npm-run-all lint dist js-typecheck-dist js-test docs-build docs-lint",
- "netlify": "npm-run-all dist release-sri astro-build",
+ "vercel": "npm-run-all dist release-sri astro-build",
"watch": "npm-run-all --parallel watch-*",
"watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm-run-all css-lint css-compile css-prefix\"",
"watch-css-docs": "nodemon --watch site/src/scss/ --ext scss --exec \"npm run css-lint\"",
diff --git a/site/astro.config.ts b/site/astro.config.ts
index 96997aacf40b..9edd970f6813 100644
--- a/site/astro.config.ts
+++ b/site/astro.config.ts
@@ -31,9 +31,9 @@ const headingsRangeRegex = new RegExp(`^h[${getConfig().anchors.min}-${getConfig
const site = isDev
? // In development mode, use the local dev server.
`http://localhost:${port}`
- : process.env.DEPLOY_PRIME_URL !== undefined
- ? // If deploying on Netlify, use the `DEPLOY_PRIME_URL` environment variable.
- process.env.DEPLOY_PRIME_URL
+ : process.env.VERCEL_ENV === 'preview'
+ ? // On Vercel preview deployments, use the `VERCEL_URL` environment variable.
+ `https://${process.env.VERCEL_URL}`
: // Otherwise, use the `baseURL` value defined in the `config.yml` file.
getConfig().baseURL
diff --git a/site/src/env.d.ts b/site/src/env.d.ts
index 8d7d4a861fea..a9f1f2520227 100644
--- a/site/src/env.d.ts
+++ b/site/src/env.d.ts
@@ -2,7 +2,9 @@
///
interface ImportMetaEnv {
- readonly NETLIFY?: string
+ readonly VERCEL?: string
+ readonly VERCEL_ENV?: string
+ readonly VERCEL_URL?: string
}
interface ImportMeta {
diff --git a/site/src/pages/robots.txt.ts b/site/src/pages/robots.txt.ts
index ae745e797659..062c7176a75c 100644
--- a/site/src/pages/robots.txt.ts
+++ b/site/src/pages/robots.txt.ts
@@ -2,9 +2,9 @@ import type { APIRoute } from 'astro'
export const GET: APIRoute = function GET({ site }) {
const isProduction = import.meta.env.PROD
- const isNetlify = import.meta.env.NETLIFY === 'true'
+ const isPreviewDeploy = import.meta.env.VERCEL_ENV === 'preview'
- const allowCrawling = !isNetlify && isProduction
+ const allowCrawling = !isPreviewDeploy && isProduction
const robotsTxt = `# www.robotstxt.org${allowCrawling ? '\n# Allow crawling of all content' : ''}
User-agent: *
diff --git a/vercel.json b/vercel.json
new file mode 100644
index 000000000000..c73ccb305e40
--- /dev/null
+++ b/vercel.json
@@ -0,0 +1,14 @@
+{
+ "version": 3,
+ "builds": [
+ {
+ "src": "package.json",
+ "use": "@vercel/static-build",
+ "config": {
+ "installCommand": "npm ci",
+ "buildCommand": "npm run vercel",
+ "distDir": "_site"
+ }
+ }
+ ]
+}