diff options
| author | Ahmed Abdelhalim <[email protected]> | 2022-06-05 16:51:53 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2022-06-05 17:13:31 +0200 |
| commit | d1419a2665e70c30cf8f35d38b987b3762e4814a (patch) | |
| tree | d63c078afd181269d766a5762aecfa7ef741d096 /.build.yml | |
| parent | 86f36f6d0fb3782c325ca1a4061e3ec2d3fb62b3 (diff) | |
Publish only main branch
Diffstat (limited to '.build.yml')
| -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 |
