Deploy with Parklife

Parklife is a Ruby library to render a Rack app (Rails/Sinatra/etc) to a static build ready to be served by GitHub Pages, Netlify, S3, Vercel, or any other server.

Ben Pickles

Install Parklife

Gemfile
...
gem "parklife-rails"

...
bundle

Initialize for Rails and GitHub Pages

bundle exec parklife init --rails --github-pages

Deploy on GitHub Pages

Commit all changes first.

Create a public GitHub repository and push the local commits. With GitHub CLI installed:

gh repo create rails-static --public --source=. --remote=origin --push

The GitHub action will fail:

The repository needs to be configured to build and deploy Pages from Actions:

And the GitHub Action triggered to re-run:

Voilà! Website deployed


Commit: Parklife


Process content with ERB

Set up with Decant and kramdown