-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fixes #23 Deploy site for each git branch #170
base: hakyll
Are you sure you want to change the base?
Conversation
Probably found a bug. Will notify you after the fix. |
78f1799
to
2ed5891
Compare
Now it should work.
|
2ed5891
to
e685013
Compare
30a0666
to
2f9fa45
Compare
Implemented deployment deletion after branch deletion. |
For development branches added a meta tag to block search bots indexing. https://developers.google.com/search/docs/advanced/crawling/block-indexing Done by monkey-patching html files after each build: replace |
Hello.
I implemented per-branch deployment for the site.
Demo
Deployments List
If you'll make your own experiments with the PR, be patient with GitHub pages. Update sometimes took up to 5 minutes.
How it works
The
hakyll
branch will be available at<domain_name>/
.Other branches are available at
<domain_name>/branches/<branch_name>
.It doesn't support automated PRs build. I described manual steps for PR creators on how to create a demo deployment here: https://github.com/visortelle/haskellfoundation.github.io#prs-deployment
Alternative
The approach with GitHub pages implemented here is the simplest way to achieve the goal that comes to my mind. An alternative approach would require extra infra resources like VM access or S3 bucket, plus automation to dynamically create and remove DNS records.
Or much simpler - switch from gh-pages to Vercel or similar hosting that supports feature branch deployments out of the box. Unfortunately, Vercel doesn't support Haskell out of the box, therefore it’s not an option if usage Hakyll is a matter of principle.
If the PR is OK for you.
There are simple extra actions you should do.
/docs
directory.gh-pages
branch from here https://github.com/visortelle/haskellfoundation.github.io/tree/gh-pages togh-pages
branch in this repo.I hope that's it.