Skip to content

Instantly share code, notes, and snippets.

@yangshun
Last active December 28, 2017 05:33
Show Gist options
  • Save yangshun/5a249b79ab31d205ade7ad26699ce514 to your computer and use it in GitHub Desktop.
Save yangshun/5a249b79ab31d205ade7ad26699ce514 to your computer and use it in GitHub Desktop.

NUSMods

Deployment

  1. SSH into the server
  2. cd ~/nusmods/www
  3. git pull
  4. yarn && npm run build
  5. Check on https://staging.nusmods.com
  6. If all is good, npm run promote-staging
  7. Files in ~/nusmods/www/dist will be copied to ~/nusmods.com

Nginx

Config located in /etc/nginx/sites-enabled. After editing a file with sudo vim <file>, you will have to restart the nginx server with:

sudo service nginx reload

URL -> Deployment Dir

https://nusmods.com -> ~/nusmods.com
http://staging.nusmods.com -> ~/nusmods/www/dist
http://v2.nusmods.com -> ~/v2.nusmods.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment