Github Pages Your Site Is Having Problems Building Unable to Build Page Please Try Again Later
From GitHub support, 2014-06-07:
It'southward not currently possible to manually trigger a rebuild, without pushing a commit to the appropriate branch.
Edit:
As Andy pointed out in the comments, yous tin push button an empty commit with the command:
git commit -m 'rebuild pages' --allow-empty git push origin <branch-name>
Edit 2:
Thanks to GitHub Deportment, it'southward fairly easy to trigger a daily publish: https://stackoverflow.com/a/61706020/4548500.
If you lot want a quick script solution, here it is. Just exercise the following tasks simply once, and run the script whenever you desire to rebuild your GitHub folio.
one. Create a personal access token for the command line:
- Follow the official help here to create a personal access token. Basically, y'all have to log in your GitHub account and go to:
Settings > Developer settings > Personal access tokens > Generate new token
. - Tick
repo
scope. - Copy the token.
2. Create the following script:
-
Create a file called
RebuildPage.sh
and add the lines:#!/bin/fustigate curl -u yourname:yourtoken -X POST https://api.github.com/repos/yourname/yourrepo/pages/builds
Hither,
- Supercede
yourname
with your GitHub username. - Replace
yourtoken
with your copied personal access token. - Replace
yourrepo
with your repository proper noun.
- Supercede
iii. Run the script:
-
If you use Windows 10:
- Yous demand to setup Windows Subsystem for Linux, if not already done. Follow this to practise and then.
- Remove the starting time line (
#!/bin/fustigate
) from the script and save the script equallyRebuildPage.bat
. (i.due east., replace.sh
with.bat
in the script file name) -
Culling to the in a higher place betoken: To get the double-click feature for running the
.sh
file:- Gear up
bash.exe
as the default programme for.sh
files. -
Open
regedit.exe
and editHKEY_CLASSES_ROOT\Applications\bash.exe\shell\open\command
. Set the(Default)
value to:"C:\Windows\System32\fustigate.exe" -c " \"./$(grep -oE '[^\\]+$' <<< '%L')\";"
- Gear up
-
Now double-click the script wheneven yous want to rebuild your GitHub page. Done!
-
If you use Linux/Mac, running the script is equally same as running other scripts. Done!
Additional notes for the solution:
This solution utilizes a API of GitHub REST API v3. Here is the official documentation for the API.
Now that GitHub Actions are available, this is trivial to exercise:
# File: .github/workflows/refresh.yml name: Refresh on: schedule: - cron: '0 3 * * *' # Runs every day at 3am jobs: refresh: runs-on: ubuntu-latest steps: - name: Trigger GitHub pages rebuild run: | curl --fail --asking Postal service \ --url https://api.github.com/repos/${{ github.repository }}/pages/builds \ --header "Authorization: Bearer $USER_TOKEN" env: # Yous must create a personal token with repo access equally GitHub does # not yet back up server-to-server folio builds. USER_TOKEN: ${{ secrets.USER_TOKEN }}
Sample repo that does this: https://github.com/SUPERCILEX/personal-website/actions
Pages API: https://developer.github.com/v3/repos/pages/#asking-a-page-build
I had this problem for a while, and pushing to main co-operative didn't alter annihilation on myapp.github.io
, for two reasons :
1 - Build
No matter how many time I tried to push my work on master, build would not start. I establish a workaround by modifying my file in Github online editor (open your index.html and edit it on Github website, and so commit)
2 - Caching issues
Fifty-fifty after a successful build, I would still meet the verbal same folio on myapp.github.io
, and difficult reloading with Ctrl + Shift + R
wouldn't solve it. Instead, if using Chrome, inspect your folio, head into the Awarding
tab, select "Clear storage" in the left card, and click on "Clear site information" at the lesser of the carte du jour.
Even after I pushed my changes to GitHub repository, I was not able to encounter the changes today. Then I checked my repository settings for more information, there I could see, all these times the build was declining and that was the reason I was not able to see the changes.
You may as well see a bulletin as "Your site is having issues edifice: Unable to build page. Please endeavour again afterwards."
Then I was checking my recent commits and tried to find out what causes this issue. At the end I was able to ready the issue.
At that place was an additional comma in the tags (,) and that acquired this event.
You lot volition not get relevant error messages if in that location are any problems in your .medico file. I recommend you to cheque for the build condition and compare the changes if you are facing the same issue.
The empty commit didn't piece of work for me, but based on @benett answer, this worked for me:
Open Postman, create a new request with this URL: https://api.github.com/repos/[user_name]/[repo_name]/pages/builds (supervene upon with your name and repo), and select POST method.
Before you run it, go to the headers
tab and add a new key Accept
with the value application/vnd.github.mister-fantastic-preview+json
Now you can run information technology and visit your pages again.
This is achievable as of v3 of the GitHub API, though it is currently in preview https://programmer.github.com/v3/repos/pages/#request-a-page-build
POST /repos/:owner/:repo/pages/builds
Source: https://exchangetuts.com/how-to-force-github-pages-build-1639500124160779
0 Response to "Github Pages Your Site Is Having Problems Building Unable to Build Page Please Try Again Later"
إرسال تعليق