i-d-template icon indicating copy to clipboard operation
i-d-template copied to clipboard

GitHub pages are not refreshed after setup

Open ralienpp opened this issue 1 year ago • 3 comments

Hi, I am attempting to use this template for a new draft. After following the instructions I see that the actions are executed successfully, but when attempting to view the generated data - I see an empty page.

I made sure the gh-pages branch was also copied when creating the repository from a template, and that the permissions for the Actions were set to "read and write". Given that there are no errors in the log, what else can I check to understand the root cause of the problem?

ralienpp avatar Oct 16 '24 21:10 ralienpp

After making some trivial edits (add and remove a word) I committed an update to the markdown file, and the pages were built.

The commits were just dummy changes that I hoped would trigger the jobs again. Is that what really did the trick, or is there a natural delay and I just needed to be patient in the first place?

ralienpp avatar Oct 16 '24 21:10 ralienpp

(Changing the title of the issue to reflect this.)

Yeah, the problem here is that while the gh-pages branch is updated by the setup action, the changes that are made do not trigger a refresh of the pages. I don't quite understand why that is the case. As you say, it's the next change that causes the pages to be published. That's mostly OK, but it is a little surprising.

It might be possible to manually publish as a last step of the setup action. I have done that on other repositories, but it's a little fiddly to arrange. If time permits, perhaps.

martinthomson avatar Oct 16 '24 23:10 martinthomson

I've looked into this more. The default setup of a repo out of the box is to pull from a branch for GitHub Pages. (If gh-pages exists when the repo is created it uses that, otherwise it draws from no branch.)

One effect of this is that it will not allow actions to push to the branch. Nor will the Pages build run when setup runs (for reasons I still don't understand). So I haven't worked out how to make this happen yet.

martinthomson avatar Nov 22 '24 10:11 martinthomson