If promote: promote to live
If delete: remove preview channel
Final step based on feedback
6
Exit
N/A
Process ends
Preview channel either promoted or deleted
💡 Process ends after promotion or deletion of preview channel
Status Tracker
Variable
Start
After Step 1
After Step 2
After Step 3
After Step 5
Final
previewChannelName
null
preview-123
preview-123
preview-123
preview-123
null or live
previewURL
null
null
https://preview-123--project.web.app
https://preview-123--project.web.app
null or live URL
null or live URL
deploymentStatus
none
created
deployed
deployed
promoted or deleted
promoted or deleted
Key Moments - 3 Insights
Why do we need to create a preview channel before deploying?
Creating a preview channel sets up an isolated environment for your build. As shown in step 1 of the execution_table, without this, you cannot deploy a preview build separately from live.
What happens if I delete a preview channel after deployment?
Deleting a preview channel removes the preview site and URL, as indicated in step 5. This means testers can no longer access that preview.
Can I promote a preview channel directly to live?
Yes, after collecting feedback, you can promote the preview build to live, replacing the live site. This is shown in step 5 where promotion is a decision point.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the previewURL after step 3?
Anull
Bhttps://preview-123--project.web.app
Chttps://live-project.web.app
Dpreview-123
💡 Hint
Check the 'Result' column in row for step 3 in execution_table
At which step does the deploymentStatus change to 'deployed'?
AStep 3
BStep 1
CStep 2
DStep 5
💡 Hint
Look at deploymentStatus changes in variable_tracker after Step 2
If you skip creating a preview channel, what will happen when deploying?
ADeployment fails because no preview channel exists
BPreview URL is generated automatically
CDeployment succeeds to live site
DPreview channel is created automatically
💡 Hint
Refer to key_moments about the importance of creating preview channel before deploy
Concept Snapshot
Preview channels let you deploy a test version of your site.
Create a channel with 'firebase hosting:channel:create <name>'.
Deploy to it with 'firebase deploy --only hosting:<name>'.
Open the preview URL to share and test.
After feedback, promote to live or delete the preview.
This keeps live site safe while testing changes.
Full Transcript
Preview channels in Firebase Hosting allow you to create isolated environments to test your site before making changes live. The process starts by creating a preview channel with a unique name. Then you deploy your build to this channel. Firebase generates a special URL for this preview, which you can share with testers. They can access the preview site and provide feedback. Based on this feedback, you decide to either promote the preview build to your live site or delete the preview channel to discard changes. This workflow helps keep your live site stable while safely testing updates.