-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3: submitted comments show up in _data/comments. However, the website doesn't get re-built #264
Comments
Additional details:
Edit: I have experimented with various fields/filenames/paths, and the result is always the same — when staticman pushes a comment, github reports " Your site is having problems building: Page build failed." As soon as I edit something completely unrelated and committ/push, the site builds just fine. For some reason the github pages service doesn't play nice with the staticman app. |
My preliminary experimentation suggests this is due to the "moderation: false" setting; It seems like Github Pages does not force a rebuild of the website unless the owner of the repository makes a commit. A fix would be to have the Staticman app send a pages build request through the Github API: I'm unsure how to make this change. |
Github support looked at why my site was not rebuilding (https://spinningnumbers.org/a/staticman.html). The issue is solved by enabling moderation. Here is the full response... It looks like your site builds are failing with the following error: I notice that this application has a moderation-mode, that will create pull requests for you to merge manually. Enabling this mode will let this app create pull requests, and will then trigger a build when you manually merge them. I'd recommend reaching out to the project maintainer for more help on this, as this will need to be something that is changed on their side. Thanks, |
Oh, wow. Thanks for looking into this.
I'm not sure I like this approach, because Staticman doesn't know (and shouldn't care) whether you use GitHub Pages or not. Its job is to get content into your repository. I'm not keen on adding logic that is specific to GitHub Pages. Given this limitation from the GitHub API, I don't see what's the best way to make Staticman work without moderation. |
@ex-punctis An obvious solution would be configuring your repo with a CI service. |
@VincentTam Thanks for the tip, I'll look into this. |
@ex-punctis Note that GitHub Actions are in beta. This includes an internal CI support. You may apply for it. Here's the template for Jekyll: |
As noted by other users, it should be possible to configure either GitHub Actions, or Travis to automatically rebuild your website when moderation is disabled. |
staticman v3 creates commits successfully (yml files appear in _data/comments), but it doesn't
trigger a rebuild(correction: fails to get rebuilt — the trigger might be fine) on github pages (the deployed version remains based on the last commit created by me rather than the bot). If I manually pull and then push back, the website gets re-built, and the new comments finally become visible.The same issue was described by @willymcallister in #243 (comment)_:
The text was updated successfully, but these errors were encountered: