{"id":15996695,"url":"https://github.com/denar90/wait-for-netlify-deploy-action","last_synced_at":"2025-03-17T20:30:45.564Z","repository":{"id":44635584,"uuid":"437381350","full_name":"denar90/wait-for-netlify-deploy-action","owner":"denar90","description":"Action waiting for live site or preview branch to be deployed. Using pure Netlify API and minimum config.","archived":false,"fork":false,"pushed_at":"2022-02-03T07:48:29.000Z","size":5323,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T00:31:18.402Z","etag":null,"topics":["continuous-integration","deployment","github-actions","netlify"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denar90.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-11T20:24:34.000Z","updated_at":"2023-03-10T10:07:57.000Z","dependencies_parsed_at":"2023-01-04T12:26:32.484Z","dependency_job_id":null,"html_url":"https://github.com/denar90/wait-for-netlify-deploy-action","commit_stats":{"total_commits":41,"total_committers":6,"mean_commits":6.833333333333333,"dds":0.6341463414634146,"last_synced_commit":"7a6f4cbdec9cae2163ee8cc9bb6df8c108e86f99"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denar90%2Fwait-for-netlify-deploy-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denar90%2Fwait-for-netlify-deploy-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denar90%2Fwait-for-netlify-deploy-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denar90%2Fwait-for-netlify-deploy-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denar90","download_url":"https://codeload.github.com/denar90/wait-for-netlify-deploy-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878483,"owners_count":20362433,"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-integration","deployment","github-actions","netlify"],"created_at":"2024-10-08T08:00:35.158Z","updated_at":"2025-03-17T20:30:44.029Z","avatar_url":"https://github.com/denar90.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐢 Wait for Netlify Deploy — A GitHub Action\n\n\u003cimg alt=\"Waiting for deploy logo\" title=\"Waiting for deploy logo\" width=\"300\" src=\"https://user-images.githubusercontent.com/6231516/145876778-d6c79fff-4cb9-42f1-bb73-08ed33b06ba8.png\"/\u003e\n\nAction waiting for live site or preview branch to be deployed.\nUsing pure [Netlify API](https://docs.netlify.com/api/get-started/) and minimum config.\n\n## How it works\n\nUsing your site API Id, action will poll Netlify API to get proper deploy status of the build related to the commit.\nIt supports any flows, like direct pushes to `main` branch or pull request flows.\n\nYou just have go to Netlify `Site Settings` menu, and find API Id:\n\n\u003cimg alt=\"Screenshot of Netlify menu to find API Id\" title=\"Screenshot of Netlify menu to find API Id\" width=\"300\" src=\"https://user-images.githubusercontent.com/6231516/145878940-5261aa63-181d-4459-9a5f-3ecd8cfdc3c9.png\"/\u003e\n\n#### Live site\n\nAfter pushing to master, action takes head commit, fetch Netlify deploy to related commit and check the status. After deploy is `ready` - it output URL for next action usage.\n\n#### Preview site\n\nNetlify has [deploy previews](https://docs.netlify.com/site-deploys/deploy-previews/). On created pull request, Netlify spins up separate deploy to allow user see their changes. Action takes pull request commit, fetches Netlify deploy and checks the status. After deploy is `ready` - it output URL (like - `https://{deployId}--modest-murdock-6e792e.netlify.app`) for next action usage.\n\n\u003e Action uses permalink e.g. `https://61bf94e5e73b010007ea2a05--modest-murdock-6e792e.netlify.app` instead of deploy preview URL like `https://deploy-preview-1--modest-murdock-6e792e.netlify.app`. \nPermalink has pure site deploy without any additional scripts, while deploy preview enables more collaboration using [Netlify Drawer](https://docs.netlify.com/site-deploys/deploy-previews/#collaborative-deploy-previews).\n\nRead Netlify [docs](https://docs.netlify.com/site-deploys/overview/#definitions) about deploy deifnitions. \n\n## Inputs\n\n### `site_id`\n\n**Required** The API id of the Netlify site\n\n### `max_timeout`\n\nOptional — The amount of time to spend waiting on Netlify deploy to be created.\n\n## Outputs\n\n### `url`\n\nUrl of a site deploy related to the commit.\n\n## How is it different from other Actions?\n\nI was inspired by https://github.com/JakePartusch/wait-for-netlify-action.\nHence this repo is a fork and keeps track of commits history for that action, but bringing new API and workflow.\n\n## Recipes\n\n### Recipe using with Lighthouse CI GitHub Action\n\nNetlify permalink deploy has disabled crawling option. Reponse header for the site is set to `x-robots-tag: noindex` not to crawl other site deploy rather than main site. You have to consider that while configuring action, otherwise Lighthouse will low down score for SEO category.  \n\n```yml\nname: Lighthouse CI for Netlify site\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - name: Use Node.js 12.x\n        uses: actions/setup-node@v1\n        with:\n          node-version: 12.x\n      - name: Wait Netlify\n        uses: denar90/wait-for-netlify-action@v2.0.2\n        id: waitForNetlify\n        with:\n          site_id: \"c8e5be00-c431-44a5-bb0d-a179e1dd72f9\"\n      - name: Set LHCI config\n        shell: bash\n        run: echo \"::set-output name=file::${{github.event_name == 'pull_request' \u0026\u0026 'lighthouserc-assertions-preview.json' || 'lighthouserc-assertions.json'}}\"\n        id: lhciConfig\n      - name: Audit URLs using Lighthouse\n        uses: treosh/lighthouse-ci-action@v3\n        with:\n          urls: |\n            ${{ steps.waitForNetlify.outputs.url }}\n            ${{ steps.waitForNetlify.outputs.url }}/about/\n            ${{ steps.waitForNetlify.outputs.url }}/projects/\n            ${{ steps.waitForNetlify.outputs.url }}/project/nested/lunar-eclipse\n            ${{ steps.waitForNetlify.outputs.url }}/project/mars-rover\n          configPath: '.github/lighthouse/${{ steps.lhciConfig.outputs.file }}'\n          uploadArtifacts: true # save results as an action artifacts\n          temporaryPublicStorage: true # upload lighthouse report to the temporary storage\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenar90%2Fwait-for-netlify-deploy-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenar90%2Fwait-for-netlify-deploy-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenar90%2Fwait-for-netlify-deploy-action/lists"}