diff options
| -rw-r--r-- | .build.yml | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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 |
