DISCOVER-Cookbook icon indicating copy to clipboard operation
DISCOVER-Cookbook copied to clipboard

Fix preview github action runner

Open aterrel opened this issue 1 year ago • 5 comments

Preview githhub action needs permission to deploy

The docs say:

grant actions permission to read and write to the repository…

See #76 for more information

aterrel avatar Dec 26 '24 13:12 aterrel

@aterrel, I have been looking at this issue. As per your action, you are using a GITHUB_TOKEN. Maybe check permissions to GITHUB_TOKEN for deployment, they might be revoked. It can be checked through:

Screenshot 2025-01-12 at 00 15 01

More information for above can be found here: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-the-default-github_token-permissions

I have made the PR with the following content, just added permission in the Github Actions Screenshot 2025-01-12 at 00 14 30

More information for above can be found here: https://github.com/peaceiris/actions-gh-pages?tab=readme-ov-file

osamaahmed17 avatar Jan 11 '25 23:01 osamaahmed17

Per our call, @AR21SM this is the issue that you can add the various ways of solving this issue.

  • https://github.com/rossjrw/pr-preview-action
  • Netlify - https://github.com/spyder-ide/spyder-docs/pull/369#:~:text=netlify/spyder%2Ddocs%2Dpreview/deploy%2Dpreview%20%E2%80%94%20Deploy%20Preview%20ready!
  • Circle CI - https://github.com/numpy/numpy/pull/29220#:~:text=ci/circleci%3A%20build%20%E2%80%94%20Your%20tests%20passed%20on%20CircleCI!

aterrel avatar Jun 17 '25 17:06 aterrel

@AR21SM this seems to be failing still. It seems the permissions are correct in the settings but the error in PRs says there is a permissions issue. Any ideas?

Image

aterrel avatar Jun 27 '25 12:06 aterrel

Example of a working PR.

Next steps:

  • [ ] Open a open source account and see about getting more previews. see https://github.com/numfocus/DISCOVER-Cookbook/pull/349#issue-3195978420

aterrel avatar Jul 22 '25 17:07 aterrel

Is, this issue is currently opened or closed? I want to contribute on this issue.

Himanshu7667-hash avatar Oct 31 '25 18:10 Himanshu7667-hash