~evanj/evanjon.es

ref: 5d167d6f2878c36e4d862072e2ee821e8c1e122e evanjon.es/.build.yml -rw-r--r-- 1.3 KiB
5d167d6fEvan J Fix(main.css): Revert last <br> changes in last commit. Modify max-width 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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