Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 7

Page build failed, then succeeds after adding empty commit

I'm using GitHub Actions to automatically build and deploy my Hugo-based site. Every time it pushes the site won't deploy, giving the basic "Page build failed." error under settings. However when I push a new empty commit to it, it builds successfully and deploys the update.

 

https://github.com/puppetlabs/wash/commit/9237ca4c027ecfeceb0b0e32a15c7b5fe6ebf943 is the most recent example that failed to build, and https://github.com/puppetlabs/wash/commit/a309e985d3e487cf86a1451df8138844422f6c2f fixed it.

6 Replies
Community Manager
Message 2 of 7

Re: Page build failed, then succeeds after adding empty commit

For security reasons, he GitHub Actions `GITHUB_TOKEN` doesn't have the ability to spawn any successive workflows, including GitHub Pages builds. If you want an automatic Pages build to run, you'll have to create a Personal Access Token or deploy key and store it as a separate secret to do so.

 

I hope that helps!

Copilot Lvl 2
Message 3 of 7

Re: Page build failed, then succeeds after adding empty commit

This is unbelievably shobby work on GitHub's part.

 

I've wasted a day, as in literally 24 hours, almost without sleep on figuring out that this is the issue.

 

Underwhelmed that this is not cleary mentioned ANYWHERE.

 

Actual humans with what used to be lives use your software.

 

Was it really so hard to figure out that people need to know this?

Community Manager
Message 4 of 7

Re: Page build failed, then succeeds after adding empty commit

I'll pass along your feedback to the team. It is mentioned that an action in a workflow can't trigger a new workflow in the event restrictions documentation. You are correct, however, that it doesn't specifically mention GitHub Pages.

Copilot Lvl 2
Message 5 of 7

Re: Page build failed, then succeeds after adding empty commit

Wouldn't it just make sense to explode and not even accept a workflow, at least for an organizational repository that is even TRYING to use GITHUB_TOKEN?

 

I mean, that's like the sole reason those accounts exist for in the first place.

A nice fat, shiny, juice, warning/error would at the very least help the next poor guy/gal.

Copilot Lvl 2
Message 6 of 7

Re: Page build failed, then succeeds after adding empty commit

The docs there specifically say:


"An action in a workflow run can't trigger a new workflow run. For example, if an action pushes code using the repository's GITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur."

 

Why would a normal user even be aware that GHP, internally, uses workflows to publish the website.

To the untrained eye, that reads as: "if you, the user, expect your own workflows to trigger with GITHUB_TOKEN, they won't".

 

This is how people who don't work for GH would read this.

 

Community Manager
Message 7 of 7

Re: Page build failed, then succeeds after adding empty commit

Yes, I've already admitted that the documentation specifically doesn't mention GitHub Pages. Please be aware that GitHub Actions is currently in beta. We are working hard to improve the service and the documentation as quickly as we can. However, if the current experience is as frustrating as it seems to be for you, you may want to wait to use GitHub Actions until we announce that it is ready for general availability.