This node app build and serve a mkdocs website on heroku with Github Authentication
- Add a webhook to the repo that includes the mkdocs. The webhook address is
http://example.com/github/callback
- Register an application with Github to use the Github OAuth service.
On Heroku set the following paramaters using heroku config:set VARIABLE=VALUE
GITHUB_CLIENT_ID=client_id
GITHUB_CLIENT_SECRET=client_secret
SITE_URL=https://example.com
DIST_FOLDER=site
REPO=developmentseed/example
If the repo is private you also need to add the username and password of a github account that has access to the repo:
GITHUB_USER=username
GITHUB_PASS=password
To limit access to specific set of github users, add usernames separated by comma to as environemt variables:
USER_LIST=user1,user2,user3
Add above configurations to .env
file.
$ node index.js