Thuta Learning
AdvancedDevOps & ToolsIntermediate

Deploying Your Website

Firebase TutorialLesson 26

Deploying Your Website

Once hosting is set up, build your project and run the deploy command. The build command varies depending on your framework.

Vite/React Project Example

javascript
npm run build
firebase deploy --only hosting

What does this code do?

npm run build outputs production-ready static files into the dist folder. firebase deploy --only hosting deploys just the hosting service.

Expected outputDeploy complete! Hosting URL: https://your-project.web.app

Deployment checklist

  • Double-check that the build output folder is correct.
  • Make sure your production domain is added under Auth domains.
  • Update your Firestore/Storage Security Rules for production.
  • If it's an SPA, check the 404/rewrite rules.

Updated on

Progress is saved only in this browser on this device. It isn't synced to other devices.

Report a problem with this lessonOpens your email app with this lesson's address filled in — nothing is sent until you send it.

Deploying Your Website | Thuta Learning