Do you have other Github actions (Lighthouse, Cypress, etc) that depend on the Vercel Preview URL? This action will wait until the url is available before running the next task.
Please note that this action is supposed to be run on the pull_request
event.
The github secret ${{ secrets.GITHUB_TOKEN }}
Optional — The name of the environment that was deployed to (e.g., staging or production)
Optional — The amount of time to spend waiting on Vercel. Defaults to 60
seconds
Optional - Use the most recent inactive deployment (previously deployed preview) associated with the pull request if
no new deployment is available. Defaults to false
.
Optional - How often (in seconds) should we make the HTTP request checking to see if the deployment is available? Defaults to 2
seconds.
Optional - The password for the deployment
The vercel deploy preview url that was deployed.
If accessing a password protected site, the JWT from the login event. This can be passed on to e2e tests, for instance.
Basic Usage
steps:
- name: Waiting for 200 from the Vercel Preview
uses: patrickedqvist/wait-for-vercel-preview@v1.2.0
id: waitFor200
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 60
# access preview url
- run: echo ${{steps.waitFor200.outputs.url}}
The Action is bundled via ncc. See this discussion for more information.
npm run build
# outputs the build to dist/index.js
Unit tests with Jest and Mock Service Worker
npm test