Update the website automatically
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
424B

  1. #!/bin/bash
  2. GIT_URL=https://git.lain.church/Jellyman-Group/Sern-Site.git
  3. OUTPUT_DIR=~/site
  4. WWW_DIR=/var/www/html/
  5. WWW_DATA_USER=www-data
  6. # remove the old site
  7. rm -rf $OUTPUT_DIR
  8. # clone the new site
  9. git clone $GIT_URL $OUTPUT_DIR
  10. # Remove the README.md from the dir
  11. rm $OUTPUT_DIR/README.md
  12. # Copy data to webdir
  13. sudo cp -r $OUTPUT_DIR/* $WWW_DIR
  14. # Change ownership
  15. sudo chown -R $WWW_DATA_USER:$WWW_DATA_USER $WWW_DIR