ci: Add PR previews with Netlify #53
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the foundation for PR previews using Netlify. Netlify is a cloud computing company that offers fast & easy deployment of pages. The free plan is sufficient and no credit card is required.
Using the provided configuration, a preview is built for each opened PR automatically.
An example can be seen here, where I tested the functionality: MoritzWeber0#1 (comment)
This avoids cases like "It works on my machine" and also makes reviews easier. You don't to set up the local environment every time for small changes, instead you can just check the result.
The only disadvantage is that someone with permissions in this repository has to create a Netlify account and link it to the GitHub repository.
It's not required to configure anything else than a page name, the whole configuration is part of the small file
netlify.toml
.It's just an idea to improve the workflow for non-tech people since they can see the result without setting up the development environment. But I can also understand if you don't want to implement it.
A similar behavior is also possible with an implementation in GitHub Pages, I can have a look at it if wanted. Something like: https://github.com/marketplace/actions/deploy-pr-preview