[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-31 (世界標準時間)。"],[],[],null,["\u003cbr /\u003e\n\nIf you have automatic rollouts enabled, every time you push a new commit to the\nlive branch in your GitHub repository App Hosting automatically rolls out a\nnew version of your app. You can check the rollout status in the\nFirebase console or in the App Hosting GitHub check.\n\nAdditionally, App Hosting supports manually triggered rollouts for\nCI/CD integration or any other case where you want to force a rollout.\n\nView rollouts\n\nThe Firebase console provides access to detailed information about all\nrollouts of your app. In [App Hosting](//console.firebase.google.com/project/_/apphosting), select **View** for\nthe backend whose rollouts you'd like to see. The **Rollouts** tab for the\nbackend displays a table listing a history of all rollouts for this backend.\n\nEach rollout entry contains links to the Cloud Build job and\nthe change or commit that triggered the rollout, along with basic information\nabout the author, creation date, and status of the rollout.\n\n- The Cloud Build job is the build environment where App Hosting runs your app's build command. You can access Cloud Build logs by clicking on the build ID.\n- The **Change** is the GitHub commit or other action that triggered the rollout.\n\nManually trigger a rollout\n\nIf you want to manually trigger a rollout from your GitHub source without\npushing a new commit, you can create a rollout from the Firebase console or\nthe Firebase CLI. This is useful for cases such as:\n\n- Forcing the regeneration of static content.\n- Allowing a CI/CD system to trigger rollouts.\n- Limiting production rollouts to specific dates or times.\n\nTo trigger a rollout in the Firebase console:\n\n1. In [App Hosting](//console.firebase.google.com/project/_/apphosting), select **View** for the backend you want to create a rollout for.\n2. In the backend dashboard summary, select **Create rollout**.\n3. Select the branch to deploy.\n4. Select the commit to deploy, either the latest commit or an earlier commit specified by its commit ID.\n5. Select **Create**. Status and a build number for the rollout is displayed in the rollout history table. When the rollout process is complete, this rollout is displayed as the current rollout.\n\nTo trigger a rollout in the Firebase CLI, run the following command and\nselect the branch for the rollout when prompted: \n\n firebase apphosting:rollouts:create \u003cvar label=\"backend ID\" translate=\"no\"\u003eBACKEND_ID\u003c/var\u003e\n\nAlternatively, you can start a rollout for the latest commit for a specific\nbranch by using the `--git-branch`option: \n\n firebase apphosting:rollouts:create \u003cvar label=\"backend ID\" translate=\"no\"\u003eBACKEND_ID\u003c/var\u003e\n --git_branch \u003cvar label=\"git branch\" translate=\"no\"\u003eBRANCH_NAME\u003c/var\u003e\n\nYou can also create a rollout with a specific commit using the `--git-commit`\noption: \n\n firebase apphosting:rollouts:create \u003cvar label=\"backend ID\" translate=\"no\"\u003eBACKEND_ID\u003c/var\u003e\n --git_commit \u003cvar label=\"git commit\" translate=\"no\"\u003eCOMMIT_ID\u003c/var\u003e\n\nRestore a previous rollout\n\nApp Hosting gives you two options for restoring a previous rollout:\n\n- Roll back instantly without rebuilding\n- Rebuild and roll back to a previous version\n\nCreate an instant rollback\n\nAt times you may need to quickly revert to an older version of your app--for\nexample, if you've discovered a critical bug in a newly deployed rollout or\nyou're experiencing a flaky build that's blocking new rollouts. In such cases\nyou can restore an existing container image of your choice from a previous\nrollout. This image is not rebuilt, but uses the code and environment\nconfiguration from when it was first built.\n\nTo create an instant rollback:\n\n1. In [App Hosting](//console.firebase.google.com/project/_/apphosting), select **View** for the backend you want to create a rollback for.\n2. Select the **Rollouts** tab.\n3. In the **History** table for the backend, select the three-dot menu for a previous build.\n4. Select **Roll back to this build** and confirm.\n\nRebuild and roll back\n\nIf you want to revert to an older version of your app but still keep current\nconfiguration, you can rebuild the app as part of the rollback process. For\nexample, if your most recent version updated an API key value in Secret Manager,\nrebuilding can ensure that the new key is used in your app after rolling back.\n\nTo rebuild and roll back:\n\n1. In [App Hosting](//console.firebase.google.com/project/_/apphosting), select **View dashboard** for the backend you want to create a rollback for.\\\\\n2. Select the **Rollouts** tab.\n3. Select **Create rollout**.\n4. In the **Create a rollout** dialog, check **Earlier commit** and then enter the commit ID for the version you want to rebuild and roll back to. The commit ID is part of the \"Change details\" for each rollout listed in your **Rollout history,** contained in parentheses in the label.\n5. Select **Create** to begin the rollback.\n\nChange rollout settings\n\nYou can change the live branch for rollouts and disable or enable automatic\nrollouts using controls in the **Settings \\\u003e Deployment** view in the dashboard\nfor a backend.\n\n1. In [App Hosting](//console.firebase.google.com/project/_/apphosting), select **View** for the backend where you want to update rollout settings.\n2. In the backend dashboard, select **Settings**. The default view displays information about domains and custom domains.\n3. Select the **Deployment** view. In this view, you can change the live branch for rollouts and disable or enable automatic rollouts. Also, there are options to set the app root directory and the environment for the backend (see [Deploy to multiple environments](/docs/app-hosting/multiple-environments))."]]