wait-for-netlify-action
wait-for-netlify-action copied to clipboard
Action doesn't work for branch pushes
Hi, I want to trigger an action when I push to dev branch without PR.
In this case action build an url with undefined parameter:

Here is a file:
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [13.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Wait for the Netlify Preview
uses: jakepartusch/wait-for-netlify-action@v1
id: netlify
with:
site_name: 'brave-pasteur-***'
max_timeout: 120
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v3
with:
urls: |
${{ steps.netlify.outputs.url }}
uploadArtifacts: true
I see an error ##[error]Action must be run in conjunction with the pull_request event but maybe it's possible to make for regular branch pushes too?
Hey @jediyozh, what would be the expected url for this case?
@JakePartusch I'm facing the same issue. Is it possible to trigger on pushes?
Hi @jithindasad, the reason it doesn't work on push is because the "push" url is not deterministic (at least the last time I checked).
PR urls are based on the pull request number, so it is possible to determine what the url will be beforehand.