Deployment
You might say
I finished the site. How do I make it available at a URL that other people can open?
Build the project and make it available on a serverDeployment turns source code into a running website or service. It may install dependencies, build assets, set environment variables, start processes, and connect a domain. A repeatable deployment includes logs, health checks, and a way to return to a known working version.
When to use it
- Publish a website📄 Source codenpm run build →📦 dist build output
- Release a new application versionVercelNetlifyGitHub Pages
- Run a backend servicegit push☁️ Automatically redeployAfter repository, branch, and build rules are configured, only matching pushes trigger deployment.
- Create preview environments for reviewmy-app-x8k2.vercel.appwww.mysite.comYou can replace the platform URL with your own domain.
When NOT to use it
- Deploy unreviewed secrets or local-only settingshttp://localhost:3000localhost is your own computer; no one else can open it.
- Assume a successful build means the service is healthyfile:///Users/…/index.htmlfile:// points to a local file, not a deployed address others can access.
- Change production manually with no record⚙ Wrong build command / output directory→Failed
- Release without knowing how to roll backImage 404Without production verification, asset paths and environment variables may break the live page.
Anatomy
💻Source code
→
📦Packaged product
→
☁️Hosting platform
→
🌐Public network URL
Source files written by you or generated by AI may not be directly run by the browser.
Static frontends often generate dist; service projects may also be built and started from source by the platform
The platform hosts static files, functions, or services based on its configuration and provides the runtime environment
Public websites usually have addresses assigned by the platform; internal services may only be accessible on private networks or between services
Variants
Vercel & Netlify
vercel --prod
A common choice for frontend projects; available features depend on the platform and plan
GitHub Pages
Settings → Pages
Host a static site directly from a repository; available controls and features depend on the plan
VPS
ssh user@1.2.3.4
Run a long-lived service when your team can maintain the server and manage deployments
Typical use cases
Production release
🎉
Congratulations!
my-first-page deployed successfully
Page preview
my-first-page.vercel.app
Preview deployment
$ npm run build
vite v6.0.0 building for production…
dist/index.html 0.5 kB
dist/assets/index-8fk2.js 142 kB
✓ built in 3.2s
dist is the output directory generated by this static front-end build
Backend service
Static website
Further reading
