deploy.sh 560 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/bash
ssh u4e@ssh-u4e.happy-dev.fr << EOF
  cd united4earth/$1 # staging || production
  
  if [ "$1" == "staging" ]; then
    git pull origin dev
  else 
    git pull origin master
  fi
  
  python manage.py migrate
  sass united4earth/static/scss/index.scss united4earth/static/css/united4earth.css
Alexandre's avatar
Alexandre committed
13
  sass united4earth/static/scss/risefor-map.scss united4earth/static/css/risefor-map.css 
14 15 16 17 18 19
  python manage.py collectstatic --noinput 
  exit
EOF

echo "Deploy successful !"
echo "Think about manually restarting the server if migrations were updated ;)"