summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.build.yml12
1 files changed, 10 insertions, 2 deletions
diff --git a/.build.yml b/.build.yml
index fe7eb23..7c410e8 100644
--- a/.build.yml
+++ b/.build.yml
@@ -13,5 +13,13 @@ tasks:
tar -C public -cvz . > ../site.tar.gz
- publish: |
- acurl -f https://pages.sr.ht/publish/a14m.me [email protected]
- acurl -f https://pages.sr.ht/publish/a14m.srht.site [email protected]
+ set +x
+ cd a14m.srht.site
+ REF=`git describe --exact-match --all ||:`
+ echo "Current Ref: $REF"
+ if [[ ! `echo $REF | awk '/origin\/main$/'` ]]; then
+ echo "Skipping publishing step. only publishing 'main' branch"
+ exit 0
+ fi
+ acurl -f https://pages.sr.ht/publish/a14m.me -Fcontent=@../site.tar.gz
+ acurl -f https://pages.sr.ht/publish/a14m.srht.site -Fcontent=@../site.tar.gz