-
Notifications
You must be signed in to change notification settings - Fork 481
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
GitHub Pages build not triggered with GITHUB_TOKEN #1177
Comments
Of course, one workaround is to "create a personal access token and supply it to your GitHub Action as a secret", but the documentation should at-least specify that :-) |
Yea, I thought we already had an issue about this. I had hoped GH would have fixed this but I guess not. |
You can use a SSH deploy key now: #1183 |
The |
Do you have an example? |
These redundant examples no longer exist as I cleaned out my repository. |
But it didnt build; https://github.com/CiaranOMara/GenomicFeatures.jl/commits/gh-pages |
I generated a few more pull requests and it turns out that I spoke too soon. The act of pushing something (.nojykell) to the |
Yea, because then you are the commiter, not github-actions. |
This feature will remove the need for a separate SSH key. |
@aminya which feature? how do i get it? |
There is no feature. This is up to GitHub. |
Maybe it is worth noting that another workaround is to use a custom token instead of |
Hi. So I'm trying to update OnlinePackage.jl to use github actions instead of travis. I'm kinda at a loss. I'm to the point where I can get a public and private SSH key, but according to the docs at https://developer.github.com/v3/actions/secrets/#create-or-update-a-secret-for-a-repository, to upload the private SSH key as a secret, I have to download another key from github, encode the private key using sodium, and then upload again? Sodium.jl seems very out of date and I have no where near the technical knowledge to be able to resurrect it. What are my options? |
You can use this to make automatic deployment work: # ]add DocumenterTools
using YourPackage, DocumenterTools
DocumenterTools.genkeys(YourPackage) Add the public key to https://github.com/Username/YourPackage.jl/settings/keys We should reword the doc to make it simpler.
|
The downside of using a custom secret (like the |
Actually, now that I've thought about it for five more minutes, that won't work, since to view the preview you still need gh-pages build to trigger. |
Is everyone atually in agreement this now works with GITHUB_TOKEN? It seems to just have not worked for me, and this was in a case where I already had a gh-pages branch and it has in the past succesfully built. Is it possible its only sporadically working? I'll test my own stuff more but wanted to ask. |
I think it depends on what triggers the build. |
Closing this as the issue described in the OP has been fixed on GitHub's side. |
The documenter docs still say:
Can that section be deleted now? |
I think the docs should point out that for gh-pages to be build the commit history must have some commit by a user with admin privileges for the repo. That means that the bot which has only write permissions will not initially trigger the build. That can be fixed by making any commits to the gh-pages branch and then the docs will be build as usual and it can use only the |
7: Build docs with julia 1.5 r=charleskawczynski a=charleskawczynski Just committed to `gh-pages` to try [this](JuliaDocs/Documenter.jl#1177 (comment)) to fix the docs. Hopefully, this fixes the doc deployment. Co-authored-by: Charles Kawczynski <[email protected]>
When updating the doc, the following warning should also be removed in function authentication_method(::GitHubActions)
if haskey(ENV, "DOCUMENTER_KEY")
return SSH
else
@warn "Currently the GitHub Pages build is not triggered when " *
"using `GITHUB_TOKEN` for authentication. See issue #1177 " *
"(https://github.com/JuliaDocs/Documenter.jl/issues/1177) " *
"for more information."
return HTTPS
end
end |
I can't reproduce the problem with the
Can someone still reproduce the problem? If yes what are the exact steps? |
I believe builds from tags generated with |
There's already a big warning for that though (see https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#GitHub-Actions ). Maybe we can leave this one and just remove the other one. |
According to #1165
GITHUB_TOKEN
is sufficient for Documenter to push togh-pages
.However it seems that this token is not allowed to trigger pages builds [1]:
Hence, docs. are correctly pushed, but GitHub Pages are never updated.
Is there any workaround ?
I tried to add a manual build trigger [2] in my workflow:
but the GitHub API returns the following error:
[1] https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869
[2] https://stackoverflow.com/a/54088985
The text was updated successfully, but these errors were encountered: