Now that I've got a domain, I thought of moving my project sites from GitHub Pages to Netlify so that I can serve them from subdomains right from Netlify using Netlify DNS. This is technically possible for sites hosted on GitHub Pages. You need to add a CNAME record to your DNS provider and CNAME file at the root of your project repository. Check out GitHub's documentation for details.
This is a simple enough task but I came across some quirks and information that might be useful:
mdbook buildas build command, you'll get
mdbook : command not founderror in deploy log.
To solve this problem, use the following build command:
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.3.7/mdbook-v0.3.7-x86_64-unknown-linux-gnu.tar.gz | tar xvz && ./mdbook build
Using Netlify's File Based Configuration:
[build] command = "curl -L https://github.com/rust-lang/mdBook/releases/download/v0.3.7/mdbook-v0.3.7-x86_64-unknown-linux-gnu.tar.gz | tar xvz && ./mdbook build"
Use whatever version of mdBook you want to use. I used v0.3.7 because my previous Travis CI config used it and it's the last patch version of v0.3.
builddir used by npm) by default. So, use this dir (or whatever folder you have used in the configuration) as publish directory.