Skip to content

Instantly share code, notes, and snippets.

@r00tdaemon
Created March 21, 2019 16:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save r00tdaemon/70eabafefa8c2e3f5fa900f352f16c5e to your computer and use it in GitHub Desktop.
Save r00tdaemon/70eabafefa8c2e3f5fa900f352f16c5e to your computer and use it in GitHub Desktop.
Host staticman v2 API on heroku

Host staticman v2 API on heroku

  • Creat a new github account which will be added as collaborator to the project using staticman.
  • Go to settings -> developer settings -> personal access tokens. Create a token with admin:repo_hook permission.
  • Save the token.

  • Create a new app on heroku
  • Setup ENV variables
    • Set NODE_ENV to production
    • Set GITHUB_TOKEN to the token generated above
    • Set RSA_PRIVATE_KEY to rsa key created by openssl genrsa -out key.pem
  • Fork staticman
  • Under deploy tab in heroku use Github as deployment method.
  • Select dev branch and deploy

ref - https://vincenttam.gitlab.io/post/2018-09-16-staticman-powered-gitlab-pages/2/

@VincentTam
Copy link

Staticman v3 API is available. It allows support for GitLab. You might want to update your gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment