| Command | Result |
|---|---|
npm run deploy | Deploys dist to the linked Netlify site |
npm run deploy -- --host=firebase | Deploys dist to Firebase Hosting |
npm run deploy -- --host=none | Leaves dist ready for another static host |
Use the first command for Netlify. Choose one of the other commands only if you prefer another host.
Update only one part
Use these commands after the first complete deployment when only one part has changed. Run them from the project folder.
| What changed | Command |
|---|---|
| Netlify website only | npm run build followed by npm exec --yes netlify-cli@26.1.0 -- deploy --prod --dir=dist |
| All Functions only | npm exec --yes firebase-tools@15.24.0 -- deploy --only functions |
| One Function only | npm exec --yes firebase-tools@15.24.0 -- deploy --only functions:FUNCTION_NAME |
| Firestore rules and indexes only | npm exec --yes firebase-tools@15.24.0 -- deploy --only firestore |
| Storage rules only | npm exec --yes firebase-tools@15.24.0 -- deploy --only storage |
| Firestore and Storage rules together | npm exec --yes firebase-tools@15.24.0 -- deploy --only firestore,storage |
Replace FUNCTION_NAME with the exported Function name, for example onOrderStatusChanged. Use npm run deploy for the first installation or whenever the website, Functions and rules all need to be published together.
Integrations
Payment and WhatsApp Functions are included in the normal deployment. Connect providers later under Settings in the business dashboard. Deployment does not ask for provider credentials.
Before deploying
.firebaserccontains the intended Firebase project ID.env.productioncontains the current HTTPS host addressfunctions/.envcontains the website address- Both environment validation commands pass
- The chosen host has been created or linked
- Optional provider sandbox testing is complete
First Firebase deployment prompts
The first Functions deployment may ask for permission to enable Google services, create service identities or update IAM permissions for Firebase service agents. Answer Yes. Firebase creates and uses these Google-managed identities so Functions and Firestore order triggers can run.
If the first deployment reports that the Eventarc Service Agent permission is still being prepared, wait a few minutes and retry only the Functions deployment:
npm exec --yes firebase-tools@15.24.0 -- deploy --only functionsFunctions that deployed successfully do not need to be removed or created again.
After deploying
Add the deployed hostname to Firebase Authentication Authorized domains. Open /admin, sign in, place a manual order and confirm it appears under Orders.
If publishing fails, fix or reconnect the hosting account and run the same command again. Do not create the administrator again.