-
Notifications
You must be signed in to change notification settings - Fork 16
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
Permission to denied error when deploying #24
Comments
It seems like a default settings change with new repositories. I think the read and write permissions configured at Settings > Actions > General at the bottom should allow it to work. Another solution suggested at https://github.com/JamesIves/github-pages-deploy-action?tab=readme-ov-file#getting-started-airplane is to add this to the workflow: permissions:
contents: write Looks like it could go between the Let me know if this helps, if so it maybe that could be added to the readme example. |
Thanks for the quick reply. I had already tried both suggestions to no avail. |
It may be because the workflow is being run in a different repository, default GitHub tokens created for workflows in forks may have limited permissions, though I'm not sure what can be done about that. I've only tested this as an "on push to main" workflow and as far as I can tell it is still working for that. If I figure anything out, I'll let you know |
Maybe not an ideal solution, but I suppose one way to test the workflow is by pushing it to the main/master branch of a fork. |
OK. Sounds a reasonable explanation. As you are using the action https://github.com/JamesIves/github-pages-deploy-action/discussions/, maybe I can ask there to see if they have more insight? There are some related discussions there, all suggesting what you proposed, but as said, I had already tried those.
I initially had that configuration, but was willing to know whether the workflow would work prior to merging the branch into
Thanks. Although I know deploying from a branch/fork is not the desired behavior for a user, ideally, a maintainer (and a user) would like to see whether a given fix or enhancement to the documentation is working as expected prior to merging the branch that contains the fix or enhancement. I ignore whether this can be done. |
Yeah, the action is a composite of 5 steps and the last step uses https://github.com/JamesIves/github-pages-deploy-action to push to the repository which is where it is failing. The doxygen-github-pages-action steps are listed in the readme and all in |
May look into that. Thanks for suggesting.
Will post the question in the discussions in there, see what they say. Will report back if something relevant is said. Thanks. |
Did not work: it showed the The In the Settings of my fork, Just for the sake of trying it, I later created directly in GitHub another GHA workflow file this time using:
in the workflow file (using So it looks there is some issue with the action being used from a fork or the events triggering the action. |
Hi,
thanks for developing and maintaining this tool.
I am trying to use it for a repository that I contribute to. So far, my effort has been unsuccessful. I am getting an
error at the moment where the deployment should take place: https://github.com/SlicerDMRI/SlicerDMRI/actions/runs/6685911043/job/18164701923?pr=195#step:2:787
I have granted write permissions to the workflow, actions do have write permissions in the repository settings, and the GitHub pages
Build and deployment
is configured to deploy from thegh-pages
branch; I have also tried setting it toGitHub Actions
with the same result.What am I missing?
Thanks.
The text was updated successfully, but these errors were encountered: