mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2024-11-10 03:39:38 +00:00
Andrei Jiroh Halili
3e9b4b9bf3
Also in this commit, I added my Keybase proof btw. Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
21 lines
No EOL
624 B
Bash
Executable file
21 lines
No EOL
624 B
Bash
Executable file
#!/bin/env
|
|
set -xe
|
|
|
|
SOURCEHUT_USERNAME=${SOURCEHUT_PAGES_SUBDOMAIN:-"ajhalili2006"}
|
|
GEMINI_CUSTOM_DOMAIN=${GEMINI_CUSTOM_DOMAIN:-"gemini.andreijiroh.eu.org"}
|
|
|
|
if [[ $SOURCEHUT_PAGES_TOKEN == "" ]]; then
|
|
echo "missing SOURCEHUT_PAGES_TOKEN variable"
|
|
exit 1
|
|
fi
|
|
|
|
tar -C gmi -cvz . -f site.tar.gz
|
|
|
|
curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \
|
|
-Fcontent=@site.tar.gz \
|
|
-Fprotocol=GEMINI \
|
|
"https://pages.sr.ht/publish/${SOURCEHUT_USERNAME}.srht.site"
|
|
curl --oauth2-bearer "$SOURCEHUT_PAGES_TOKEN" \
|
|
-Fcontent=@site.tar.gz \
|
|
-Fprotocol=GEMINI \
|
|
"https://pages.sr.ht/publish/${GEMINI_CUSTOM_DOMAIN}" |