summaryrefslogtreecommitdiffstats
path: root/.build.yml
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2022-06-05 16:51:53 +0200
committerAhmed Abdelhalim <[email protected]>2022-06-05 17:13:31 +0200
commitd1419a2665e70c30cf8f35d38b987b3762e4814a (patch)
treed63c078afd181269d766a5762aecfa7ef741d096 /.build.yml
parent86f36f6d0fb3782c325ca1a4061e3ec2d3fb62b3 (diff)
Publish only main branch
Diffstat (limited to '.build.yml')
-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