deploy.sh 340 B

1234567891011121314151617
  1. #!/bin/bash
  2. python3 sitegen.py --with-index || {
  3. echo 'fail_generating_the_site'
  4. exit 1
  5. }
  6. sudo rm -r /var/www/alucho || {
  7. echo 'fail_deleting_target_folder'
  8. exit 2
  9. }
  10. sudo cp -r build /var/www/alucho || {
  11. echo 'fail_copying_site'
  12. exit 3
  13. }
  14. sudo service caddy restart || {
  15. echo 'fail_restarting_caddy'
  16. exit 4
  17. }