{"id":15873788,"url":"https://github.com/firebaseextended/action-hosting-deploy","last_synced_at":"2025-05-14T05:11:01.895Z","repository":{"id":39626029,"uuid":"290288569","full_name":"FirebaseExtended/action-hosting-deploy","owner":"FirebaseExtended","description":"Automatically deploy shareable previews for your Firebase Hosting sites","archived":false,"fork":false,"pushed_at":"2025-05-05T15:36:31.000Z","size":1845,"stargazers_count":734,"open_issues_count":138,"forks_count":213,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-05T19:15:18.278Z","etag":null,"topics":["continuous-deployment","firebase","firebase-hosting","github-actions"],"latest_commit_sha":null,"homepage":"https://firebase.google.com/docs/hosting/github-integration","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FirebaseExtended.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-25T18:09:29.000Z","updated_at":"2025-05-02T14:08:28.000Z","dependencies_parsed_at":"2023-02-10T13:45:30.851Z","dependency_job_id":"e4a1756b-56e5-4b82-9947-f45f5d961895","html_url":"https://github.com/FirebaseExtended/action-hosting-deploy","commit_stats":{"total_commits":109,"total_committers":23,"mean_commits":4.739130434782608,"dds":0.5412844036697247,"last_synced_commit":"7a831e3ee9349aecd334c2cc01080a2c71a29509"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirebaseExtended%2Faction-hosting-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirebaseExtended%2Faction-hosting-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirebaseExtended%2Faction-hosting-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FirebaseExtended%2Faction-hosting-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FirebaseExtended","download_url":"https://codeload.github.com/FirebaseExtended/action-hosting-deploy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076850,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continuous-deployment","firebase","firebase-hosting","github-actions"],"created_at":"2024-10-06T01:06:36.568Z","updated_at":"2025-05-14T05:10:56.875Z","avatar_url":"https://github.com/FirebaseExtended.png","language":"TypeScript","readme":"# 🔥🌎 Firebase Hosting GitHub Action\n\n- Creates a new preview channel (and its associated preview URL) for every PR on your GitHub repository.\n- Adds a comment to the PR with the preview URL so that you and each reviewer can view and test the PR's changes in a \"preview\" version of your app.\n- Updates the preview URL with changes from each commit by automatically deploying to the associated preview channel. The URL doesn't change with each new commit.\n- (Optional) Deploys the current state of your GitHub repo to your live channel when the PR is merged.\n\n## Setup\n\nA full setup guide can be found [in the Firebase Hosting docs](https://firebase.google.com/docs/hosting/github-integration).\n\nThe [Firebase CLI](https://firebase.google.com/docs/cli) can get you set up quickly with a default configuration.\n\n- If you've NOT set up Hosting, run this version of the command from the root of your local directory:\n\n```bash\nfirebase init hosting\n```\n\n- If you've ALREADY set up Hosting, then you just need to set up the GitHub Action part of Hosting.\n  Run this version of the command from the root of your local directory:\n\n```bash\nfirebase init hosting:github\n```\n\n## Usage\n\n### Deploy to a new preview channel for every PR\n\nAdd a workflow (`.github/workflows/deploy-preview.yml`):\n\n```yaml\nname: Deploy to Preview Channel\n\non:\n  pull_request:\n    # Optionally configure to run only for specific files. For example:\n    # paths:\n    # - \"website/**\"\n\njobs:\n  build_and_preview:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      # Add any build steps here. For example:\n      # - run: npm ci \u0026\u0026 npm run build\n      - uses: FirebaseExtended/action-hosting-deploy@v0\n        with:\n          repoToken: \"${{ secrets.GITHUB_TOKEN }}\"\n          firebaseServiceAccount: \"${{ secrets.FIREBASE_SERVICE_ACCOUNT }}\"\n          expires: 30d\n          projectId: your-Firebase-project-ID\n```\n\n### Deploy to your live channel on merge\n\nAdd a workflow (`.github/workflows/deploy-prod.yml`):\n\n```yaml\nname: Deploy to Live Channel\n\non:\n  push:\n    branches:\n      - main\n    # Optionally configure to run only for specific files. For example:\n    # paths:\n    # - \"website/**\"\n\njobs:\n  deploy_live_website:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      # Add any build steps here. For example:\n      # - run: npm ci \u0026\u0026 npm run build\n      - uses: FirebaseExtended/action-hosting-deploy@v0\n        with:\n          firebaseServiceAccount: \"${{ secrets.FIREBASE_SERVICE_ACCOUNT }}\"\n          projectId: your-Firebase-project-ID\n          channelId: live\n```\n\n## Options\n\n### `firebaseServiceAccount` _{string}_ (required)\n\nThis is a service account JSON key. The easiest way to set it up is to run `firebase init hosting:github`. However, it can also be [created manually](./docs/service-account.md).\n\nIt's important to store this token as an\n[encrypted secret](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)\nto prevent unintended access to your Firebase project. Set it in the \"Secrets\" area\nof your repository settings and add it as `FIREBASE_SERVICE_ACCOUNT`:\n`https://github.com/USERNAME/REPOSITORY/settings/secrets`.\n\n### `repoToken` _{string}_\n\nAdding `repoToken: \"${{secrets.GITHUB_TOKEN}}\"` lets the action comment on PRs\nwith the preview URL for the associated preview channel. You don't need to set\nthis secret yourself - GitHub sets it automatically.\n\nIf you omit this option, you'll need to find the preview URL in the action's\nbuild log.\n\n### `expires` _{string}_\n\nThe length of time the preview channel should remain active after the last deploy.\nIf left blank, the action uses the default expiry of 7 days.\nThe expiry date will reset to this value on every new deployment.\n\n### `projectId` _{string}_\n\nThe Firebase project that contains the Hosting site to which you\nwant to deploy. If left blank, you need to check in a `.firebaserc`\nfile so that the Firebase CLI knows which Firebase project to use.\n\n### `channelId` _{string}_\n\nThe ID of the channel to deploy to. If you leave this blank,\na preview channel and its ID will be auto-generated per branch or PR.\nIf you set it to **`live`**, the action deploys to the live channel of your default Hosting site.\n\n_You usually want to leave this blank_ so that each PR gets its own preview channel.\nAn exception might be that you always want to deploy a certain branch to a\nlong-lived preview channel (for example, you may want to deploy every commit\nfrom your `next` branch to a `preprod` preview channel).\n\n### `target` _{string}_\n\nThe target name of the Hosting site to deploy to. If you leave this blank,\nthe default target or all targets defined in the `.firebaserc` will be deployed to.\n\nYou usually want to leave this blank unless you have set up multiple sites in the Firebase Hosting UI\nand are trying to target just one of those sites with this action.\n\nRefer to the Hosting docs about [multiple sites](https://firebase.google.com/docs/hosting/multisites)\nfor more information about deploy targets.\n\n### `entryPoint` _{string}_\n\nThe directory containing your [`firebase.json`](https://firebase.google.com/docs/cli#the_firebasejson_file)\nfile relative to the root of your repository. Defaults to `.` (the root of your repo).\n\n### `firebaseToolsVersion` _{string}_\n\nThe version of `firebase-tools` to use. If not specified, defaults to `latest`.\n\n### `disableComment` _{boolean}_\n\nDisable commenting in a PR with the preview URL.\n\n## Outputs\n\nValues emitted by this action that can be consumed by other actions later in your workflow\n\n### `urls`\n\nThe url(s) deployed to\n\n### `expire_time`\n\nThe time the deployed preview urls expire, example: 2024-04-10T14:37:53.817800922Z\n\n### `expire_time_formatted`\n\nThe time the deployed preview urls expire in the UTC format, example: Tue, 09 Apr 2024 18:24:42 GMT\n\n### `details_url`\n\nA single URL that was deployed to\n\n## Status\n\n![Status: Experimental](https://img.shields.io/badge/Status-Experimental-blue)\n\nThis repository is maintained by Googlers but is not a supported Firebase product. Issues here are answered by maintainers and other community members on GitHub on a best-effort basis.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirebaseextended%2Faction-hosting-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirebaseextended%2Faction-hosting-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirebaseextended%2Faction-hosting-deploy/lists"}