#!/bin/bash # Build an identicon generator website, optionally publish it if # "publish" is given as first argument. set -o errexit ghpages=.ghpages git_url="git@github.com:jodersky/yamlesque.git" mill site.fullOpt mkdir -p "$ghpages" cp -f site/index.html "$ghpages" cp -f out/site/fullOpt/dest/out.js "$ghpages" case "$1" in publish) echo "Publishing website" >&2 git -C "$ghpages" init git -C "$ghpages" add . git -C "$ghpages" commit -m "Publish website" || true git -C "$ghpages" push -f "$git_url" master:gh-pages ;; *) echo "Skipping publish step" >&2 ;; esac