GitHub pages are not updating

后端 未结 30 2431
[愿得一人]
[愿得一人] 2020-12-04 15:22

I\'m running into a weird issue with GitHub pages. I pushed a new commit to my personal pages page maltzj.github.io, but the new article isn\'t showing up there. When I exec

30条回答
  •  情深已故
    2020-12-04 15:49

    I had this problem this week and no solution worked. I don't use Jekyll, only pure static HTML. It just sat three days refusing to update.

    Here is what I had to do to get it to publish again.

    • Make a snapshot branch from master.
    • Reset the master branch to the last commit that is live. (Commits tab, green checkmarks indicate published commits)
    • Make a new commit with a smoke test. I made an HTML comment I could grep.
    • Force push master.
    • Check results curl https://example.com | grep SMOKETEST
    • Reset master again, removing the smoke test.
    • Cherry-pick each commit from the snapshot branch you need to get your unpublished changes back into master (cherry-picking gives the commits new ids/hashes, avoiding the risk of anything having cached them from before).
    • Force push master again.
    • Now you should get green checkmarks and published updates.

    Note: It could be enough to force push to remove the commits that are stuck and getting them back again. The smoke test is almost certainly not required. Cherry-picking may not be required.

提交回复
热议问题