Skip to content
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

Add deploy previews for PRs #103

Open
calvinatian opened this issue Feb 23, 2024 · 1 comment
Open

Add deploy previews for PRs #103

calvinatian opened this issue Feb 23, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@calvinatian
Copy link
Contributor

It would be nice if we could deploy PRs to preview what new pages/changes look like online.

There is a beta gh action for this but it does not support previews from forks for security reasons: https://github.com/marketplace/actions/deploy-pr-preview

Someone made another action based on the above for docusaurus but it has been archived: https://github.com/marketplace/actions/build-deploy-to-github-pages-and-deploy-pr-preview

There is also a non-foss service that offers a free tier for oss projects: https://docs.pushpreview.com/installation/docusaurus

@calvinatian calvinatian added enhancement New feature or request help wanted Extra attention is needed labels Feb 23, 2024
@calvinatian calvinatian self-assigned this Feb 23, 2024
@rilieo rilieo assigned rilieo and unassigned calvinatian Aug 10, 2024
@rilieo
Copy link
Contributor

rilieo commented Aug 19, 2024

To whoever can work on this:

Because I don't have the right permissions, I can't access the settings page of this repo to add secrets and such. However, I managed to set it up on a repo on my GitHub account here.

I followed this tutorial (also linked in Calvin's comment), but the YAML config file is slightly different.

Something the tutorial also didn't mention was the default for GITHUB_TOKEN in repos is read-only. So, the workflow won't work. You can change to write permissions in Settings > Actions > General. For more granular permissions, you can configure them in the YAML config file, as detailed in GitHub's docs.

Extra security measures should probably be taken because we don't want to get hacked 😶

@rilieo rilieo removed their assignment Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants