~ajhalili2006's personal website, built with Zensical (successor of Material for Mkdocs) [old repo name got bugged while attempting to do manual knot migration via repo deletion] andreijiroh.dev
zensical mkdocs-material website
1#!/usr/bin/env bash 2set -xe 3 4SOURCEHUT_USERNAME=${SOURCEHUT_PAGES_SUBDOMAIN:-"ajhalili2006"} 5GEMINI_CUSTOM_DOMAIN=${GEMINI_CUSTOM_DOMAIN:-"gemini.andreijiroh.eu.org"} 6 7if [[ $SOURCEHUT_PAGES_TOKEN == "" ]]; then 8 echo "missing SOURCEHUT_PAGES_TOKEN variable" 9 exit 1 10fi 11 12mkdir "gmi/api" 13git rev-parse HEAD > "gmi/api/commit" 14tar -C gmi -cvz . -f site.tar.gz 15 16curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \ 17 -Fcontent=@site.tar.gz \ 18 -Fprotocol=GEMINI \ 19 "https://pages.sr.ht/publish/${SOURCEHUT_USERNAME}.srht.site" 20curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \ 21 -Fcontent=@site.tar.gz \ 22 -Fprotocol=GEMINI \ 23 "https://pages.sr.ht/publish/${GEMINI_CUSTOM_DOMAIN}"