Leaflet: Get rid of gh-pages

Created on 2 Apr 2016  路  12Comments  路  Source: Leaflet/Leaflet

Idea is to keep documentation and static site (tutorial...) in the master branch.

Let's start by looking for hosting alternatives.

It needs to:

  • be free for open source
  • be deployable through git the easy way
  • or be deployable through Travis
  • allow prebuild hooks to generate documentation with Leafdoc.
  • allow custom domain

Another option is to try to keep gh-pages is sync automatically, but this needs to be digged in.

docs

Most helpful comment

I would personally recommend using Cloudflare for the CDN, it is free and would allow HTTPS for CDN, blog, docs, website, everything.

I can help setting it up, I did it on a dozen websites last month.

All 12 comments

Hosting alternative

Pros:

  • everything in master

Cons:

  • one more workflow to maintain

Surge

http://surge.sh/
Seems the best option so far.
Integrated with Travis: http://surge.sh/help/integrating-with-travis-ci
Custom domain and SSL (but SSL on a custom domain needs paid account)
Free for our needs: http://surge.sh/pricing

aerobatic

https://www.aerobatic.com/docs/getting-started
Only works with Bitbuket (akward).
We may want to maintain a Bitbucket mirror, it may be less of a pain than having a separate branch (can be easily automated), but seems a bit complex for what we want to achieve.

Firebase

No custom domain on the free plan: https://www.firebase.com/pricing.html

BitBalloons

No custom domain on the free plan: https://www.bitballoon.com/pricing

NeoCities

Not easy to integrate on a git workflow https://neocities.org/api

Automatic sync of gh-pages

Pros:

  • no needs to deal with a new tool in the workflow

Cons:

  • we'll need to deal with people doing PR directly on gh-pages

git directory deploy script

https://github.com/X1011/git-directory-deploy

git subtree

https://gist.github.com/cobyism/4730490

Push in another repository

Cons:

  • we'll need to deal with the confusion about how this other repository is maintained (people will want to make PRs on it, and if we block it we need to explain how it is updated in an obvious way).

Why not use travis to build it and deploy to a different repo in the leaflet org for hosting with gh-pages?

That's an option. But having two separate repositories (even if we should push only on one) will still be confusing.

Would that be less confusing than having to understand a completely different platform?

I meant confusing for other users not aware of the subtilties of those two repos, not for us ;)

Turns out that surge.sh is free for custom domain, free for SSL, but _SSL on a custom domain_ is paid feature.
Apart from that, surge sounds like a really nice service. I've deployed the site in 5 minutes (including time to install jekyll on my new Arch laptop :p ): http://leaflet.surge.sh

Other option to consider: https://github.com/X1011/git-directory-deploy

cf also #3277

Ingoing discussion here in Madrid: now that documentation is generated, it can makes sense to separate it from the main Leaflet site and blog, which are hand maintained.
So we can have something like:

  • a new git repository leafletjs.com that would be a gh-pages only repo, keeping using Github Pages for it (or maybe not)
  • a new domain doc.leafletjs.com, and a dedicated surge site, without ssl for now, which is generated from Travis

Not sure the best way to deal with a shared menu if we go this way, so maybe we should remove the menu from the documentation and just have "Back to main site" link on the top of the page?

13$ per month? nginx+github webhook+let's encrypt+digital ocean box for 5$ per month in nicest option.

I would personally recommend using Cloudflare for the CDN, it is free and would allow HTTPS for CDN, blog, docs, website, everything.

I can help setting it up, I did it on a dozen websites last month.

What about Sphinx + readthedocs.org?

As of today, you can also use master as a source to build gh-pages for, and even a docs/ subdirectory in the master branch:

https://github.com/blog/2228-simpler-github-pages-publishing

Was this page helpful?
0 / 5 - 0 ratings