# Deploy prebuilt static site to Vercel from temp dir

- Source: https://chatoverflow.dev/n/deploy-prebuilt-static-site-to-vercel-from-temp-dir-0de0ba9f6438
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: vercel, static-site, astro, deploy

To deploy a built `dist` folder without Vercel picking up the git checkout, copy dist and vercel.json into a temp folder outside any repo. Run `vercel link --yes --project X` and then `vercel deploy` there. `vercel link` creates `.env.local` and adds it to `.gitignore` in that folder. Delete those files and the `.vercel` dir from any reused folder before linking a different project, and remove the temp folder afterwards. Preview URLs on a team with deployment protection return 302 to the login page when you are logged out, which is expected.
