{"id":18282946,"url":"https://github.com/zentered/vercel-preview-url","last_synced_at":"2025-08-09T16:21:34.514Z","repository":{"id":42532313,"uuid":"328181236","full_name":"zentered/vercel-preview-url","owner":"zentered","description":"GitHub Action to receive the deployment preview URL from Vercel","archived":false,"fork":false,"pushed_at":"2025-02-04T21:29:42.000Z","size":2700,"stargazers_count":32,"open_issues_count":1,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T14:29:36.167Z","etag":null,"topics":["action","deployment","github","vercel","vercel-deployment","vercel-shorturl"],"latest_commit_sha":null,"homepage":"https://github.com/zentered/vercel-preview-url#readme","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zentered.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-01-09T15:07:58.000Z","updated_at":"2025-04-26T15:36:20.000Z","dependencies_parsed_at":"2023-01-11T17:22:12.933Z","dependency_job_id":"a011e8ab-8665-4386-b9d0-86a64dca445c","html_url":"https://github.com/zentered/vercel-preview-url","commit_stats":{"total_commits":123,"total_committers":7,"mean_commits":"17.571428571428573","dds":0.5121951219512195,"last_synced_commit":"80af398f1bd4bcc505491b7a56807783b3de3333"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fvercel-preview-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fvercel-preview-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fvercel-preview-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentered%2Fvercel-preview-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zentered","download_url":"https://codeload.github.com/zentered/vercel-preview-url/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253754791,"owners_count":21958908,"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":["action","deployment","github","vercel","vercel-deployment","vercel-shorturl"],"created_at":"2024-11-05T13:06:47.756Z","updated_at":"2025-05-12T14:29:45.627Z","avatar_url":"https://github.com/zentered.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vercel Preview URL\n\n![Test](https://github.com/zentered/vercel-preview-url/workflows/Test/badge.svg)\n[![Integration Test](https://github.com/PatrickHeneise/vercel-preview-action-test/actions/workflows/integration.yml/badge.svg)](https://github.com/PatrickHeneise/vercel-preview-action-test/actions/workflows/integration.yml)\n![Release](https://github.com/zentered/vercel-preview-url/workflows/Publish/badge.svg)\n[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\nRetrieve the preview URL from the Vercel API, filtered by the repo and branch. The URL can then be used for further end-to-end tests, link checks and other PR integrations/actions.\n\nThe main difference to [Capture Vercel Preview URL](https://github.com/marketplace/actions/capture-vercel-preview-url) is that the action runs on `push` and `pull_request`, not on `issue_comment`. This enables 3rd party GitHub integrations to report directly on the Pull Request.\n\n## Table of Contents\n\n- [Vercel Preview URL](#vercel-preview-url)\n  - [Table of Contents](#table-of-contents)\n  - [Usage](#usage)\n    - [Vercel Project ID](#vercel-project-id)\n  - [Environment Variables / Secret](#environment-variables--secret)\n  - [Inputs](#inputs)\n  - [Outputs](#outputs)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Usage\n\n- [Create a Vercel API Token](https://vercel.com/account/tokens)\n- See [Integration Test / Demo](https://github.com/PatrickHeneise/vercel-preview-action-test/blob/main/.github/workflows/integration.yml)\n\nVercel needs a little time to build the preview, you can check the average build time in your deployments and add the seconds plus a little to a `sleep` action, to wait until the deployment is `READY`.\n\nInstead of an arbitrary time, the [Await for Vercel deployment](https://github.com/marketplace/actions/await-for-vercel-deployment) Action can be used.\n\n```yaml\n- run: sleep 30\n- name: vercel-preview-url\n  uses: zentered/vercel-preview-url@v1.1.9\n  id: vercel_preview_url\n  env:\n    VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}\n  with:\n    vercel_project_id: 'prj_XYZ123'\n- name: Get URL\n  run: echo \"https://${{ steps.vercel_preview_url.outputs.preview_url }}\"\n```\n\n### Vercel Project ID\n\nYour project name is not the same as the project ID. You can find the project ID in the Project Settings, it starts with `prj_`:\n\n![vercel project id](.github/assets/projectid.png)\n\n## Environment Variables / Secret\n\nIn the repository, go to \"Settings\", then \"Secrets\" and add \"VERCEL_TOKEN\", the value you can retrieve on your [Vercel account](https://vercel.com/account/tokens).\n\nBy optionally setting `SEARCH_BRANCH_NAME` as an environment variable, you can override the branch name used to search for deployments in Vercel.\nThis environment variable is useful in cases where GITHUB_REF becomes the default branch, such as when commenting on pull requests or adding labels.\n\n## Inputs\n\nTo see more information on inputs, see the [Vercel Documentation](https://vercel.com/docs/rest-api#endpoints/deployments/list-deployments).\n\n| Name                | Requirement | Type      | Description                  |\n| ------------------- | ----------- | --------- | ---------------------------- |\n| `vercel_team_id`    | optional    | string    | Team id                      |\n| `vercel_app`        | optional    | string    | Name of the deployment       |\n| `vercel_from`       | optional    | timestamp | Deployment after this date   |\n| `vercel_project_id` | optional    | string    | Vercel project id            |\n| `vercel_since`      | optional    | timestamp | Deployment since this date   |\n| `vercel_state`      | optional    | string    | Filter on state              |\n| `vercel_target`     | optional    | string    | Deployment environment       |\n| `vercel_to`         | optional    | timestamp | Deployment before this date  |\n| `vercel_until`      | optional    | timestamp | Deployment before this date  |\n| `vercel_users`      | optional    | string    | Filter on created by user(s) |\n\n## Outputs\n\n| Name               | Description                                                                                                                       |\n| ------------------ | --------------------------------------------------------------------------------------------------------------------------------- |\n| `preview_url`      | A string with the unique URL of the deployment. If it hasn't finished uploading (is incomplete), the value will be null           |\n| `deployment_state` | A string with the current deployment state, it could be one of the following QUEUED, BUILDING, READY, or ERROR.                   |\n| `branch_alias`     | A string with the [branch alias](https://vercel.com/docs/cli/alias), that is a custom domain that Vercel creates for that branch. |\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md).\n\n## License\n\nSee [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentered%2Fvercel-preview-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzentered%2Fvercel-preview-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentered%2Fvercel-preview-url/lists"}