deploy-pages icon indicating copy to clipboard operation
deploy-pages copied to clipboard

Question: Deployment error instead of skipped when triggered from pull-request

Open feryardiant opened this issue 2 years ago • 3 comments

Hi there,

Just try out this action to deploy our website, I noticed that if the workflow is triggered by pull-request it's error without any info, like this

Screen Shot 2022-08-01 at 05 24 08

while in the documentation stated as it should be skipped

This step is skipped if the workflow was triggered by a pull request.

Is it a bug or actually an expected feature?

Regards,

feryardiant avatar Jul 31 '22 22:07 feryardiant

Apparently it still needs to have if: github.event_name == 'push' to make it skipped on pull-request.

deploy:
  runs-on: ubuntu-latest
  if: github.event_name == 'push'
  needs: build
Screen Shot 2022-08-01 at 05 43 23

feryardiant avatar Jul 31 '22 22:07 feryardiant

@feryardiant Thank you for opening this. We will correct the documentation. We have decided to have the starter workflows only trigger on the default branch and not track pull requests at the moment (e.g. here).

yoannchaudet avatar Aug 01 '22 19:08 yoannchaudet

Having it running from pull-request would be awesome as it would enable to host previews of the site changes in pages directly. (ideally in a subfolder like https://user.github.io/project/pull-request/123/)

NicolasMassart avatar Aug 12 '22 12:08 NicolasMassart

Well I am late but the documentation change was merged a while ago!

@NicolasMassart One day!

yoannchaudet avatar Jan 29 '24 18:01 yoannchaudet