~evanj/cms

ba9afb55892dd6cf26a66d76dd000555b282a19a — Evan M Jones 5 months ago da0b6a8
WIP(.build.yml): Only deploy on master branch.
2 files changed, 2 insertions(+), 3 deletions(-)

M .build.yml
M internal/s/tmpl/html/_header.html
M .build.yml => .build.yml +2 -2
@@ 18,8 18,8 @@ tasks:
      touch .env
      make gen
      make build
      if [ `git branch | head -n 1 | awk '{print$2}'` == "master" ]; then
        echo "deploying..."
      if [ `git branch | head -n 1 | awk '{print$5}' | sed 's/)//g' | xargs -I X bash -c "git log --pretty=oneline origin/master | grep X" | wc -l` == "1" ]; then
        echo "deploying to production"
        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"'

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