wait-for-vercel-preview icon indicating copy to clipboard operation
wait-for-vercel-preview copied to clipboard

Wait for preview but skip status check

Open juliofarah opened this issue 3 years ago • 1 comments

Hi there! First of all thanks for the great action you've built!

My public preview doesn't have a home page (currently returns 404) and only works with sub-routes (eg public-preview.com/client-id/home). I was wondering if there would be a way to skip the 200 OK status check (I assume this function? https://github.com/patrickedqvist/wait-for-vercel-preview/blob/main/dist/index.js#L123).

juliofarah avatar Jun 15 '22 19:06 juliofarah

You can instead check another page that isn't in the root domain, like https://website.com/my-intial-page. You can use the path param for that. It would look like this:

jobs:
    test_setup:
        name: Wait for Vercel deployment
        runs-on: ubuntu-latest
        outputs:
            preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
        steps:
          - name: Wait for Vercel preview deployment to be ready
            uses: patrickedqvist/[email protected]
            id: waitForVercelPreviewDeployment
            with:
                token: ${{ secrets.GITHUB_TOKEN }}
                max_timeout: 600
                path: '/my-intial-page'

eltonmesquita avatar Sep 15 '22 09:09 eltonmesquita