~evanj/cms

da0b6a837eea2e10fff8297d0a6d3991b111910b — Evan M Jones 5 months ago 7e0c364
Feat(.build.yml): Only deploy on master branch.
2 files changed, 9 insertions(+), 3 deletions(-)

M .build.yml
M internal/s/tmpl/html/_header.html
M .build.yml => .build.yml +8 -3
@@ 18,6 18,11 @@ tasks:
      touch .env
      make gen
      make build
      ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "rm ~/cms/cms 2>/dev/null"'
      scp -o 'StrictHostKeyChecking=no' cms evan@140.82.14.80:~/cms
      ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "sudo systemctl restart cms"'
      if [ `git branch | head -n 1 | awk '{print$2}'` == "master" ]; then
        echo "deploying..."
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "rm ~/cms/cms 2>/dev/null"'
        scp -o 'StrictHostKeyChecking=no' cms evan@140.82.14.80:~/cms
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "sudo systemctl restart cms"'
      else 
        echo "not deploying"
      fi

M internal/s/tmpl/html/_header.html => internal/s/tmpl/html/_header.html +1 -0
@@ 1,3 1,4 @@
<!-- hello world -->
<header class='bg-primary'>
  <nav class='container navbar navbar-expand-lg navbar-dark'>
    <a class='navbar-brand' href='/'>CMS</a>