~evanj/evanjon.es

e825544975aba920d014a1d85a9e0d049e36cac0 — Evan J 7 months ago b2569bb
TMP(.build.yml): Temporarily deleting CI/build file.
1 files changed, 0 insertions(+), 27 deletions(-)

D .build.yml
D .build.yml => .build.yml +0 -27
@@ 1,27 0,0 @@
image: debian/testing
packages:
  - make
  - golang
sources:
  - https://git.sr.ht/~evanj/evanjon.es
secrets:
  - 0154a9d3-f2c9-4ee2-8102-7c4c92492149
tasks:
  - build: |
      export PATH=$PATH:$HOME/go/bin
      cd evanjon.es
      touch .env
      make setup gen build
      if [ `git branch | head -n 1 | awk '{print$5}' | sed 's/)//g' | xargs -I X bash -c "git log --pretty=oneline origin/master | head -n 1 | grep X" | wc -l` == "1" ]; then
        echo "deploying to production"
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "rm ~/evanjon.es/evanjon.es 2>/dev/null"'
        scp -o 'StrictHostKeyChecking=no' evanjon.es evan@140.82.14.80:~/evanjon.es
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "sudo systemctl restart evanjon.es"'
      elif [ `git branch | head -n 1 | awk '{print$5}' | sed 's/)//g' | xargs -I X bash -c "git log --pretty=oneline origin/tip | head -n 1 | grep X" | wc -l` == "1" ]; then
        echo "deploying to tip"
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "rm ~/evanjon.es.tip/evanjon.es 2>/dev/null"'
        scp -o 'StrictHostKeyChecking=no' evanjon.es evan@140.82.14.80:~/evanjon.es.tip
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "sudo systemctl restart evanjon.es.tip"'
      else 
        echo "not deploying"
      fi