26 lines
761 B
Bash
Executable File
26 lines
761 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# https://github.com/cirosantilli/china-dictatorship#mirrors
|
|
|
|
set -eux
|
|
make
|
|
git push --follow-tags
|
|
git push git@gitlab.com:cirosantilli/china-dictatorship.git
|
|
|
|
# GitHub pages.
|
|
# One time initial setup.
|
|
# git checkout --orphan gh-pages
|
|
# and copy over https://github.com/cirosantilli/jekyll-min
|
|
gh_pages_dir=out/gh-pages
|
|
if [ ! -d "$gh_pages_dir" ]; then
|
|
mkdir -p "$gh_pages_dir"
|
|
git clone --branch gh-pages "$(git remote get-url origin)"
|
|
fi
|
|
cp README.html "${gh_pages_dir}/index.html"
|
|
cp .gitlab-ci.yml "${gh_pages_dir}"
|
|
git -C "$gh_pages_dir" add .
|
|
if git -C "$gh_pages_dir" commit -m "$(git log -1 --format="%H")"; then
|
|
git -C "$gh_pages_dir" push
|
|
git -C "$gh_pages_dir" push git@gitlab.com:cirosantilli/china-dictatorship.git
|
|
fi
|