From 4e1c0198337bda5dfea93636c33435e1441c1ef2 Mon Sep 17 00:00:00 2001 From: Sicheng Hao Date: Mon, 12 Sep 2022 18:54:36 -0400 Subject: [PATCH 1/2] updated website testing and deploy guide --- website/README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/website/README.md b/website/README.md index 08894b9..6c7dca9 100644 --- a/website/README.md +++ b/website/README.md @@ -2,13 +2,55 @@ ## Instructions for running the website locally -1. Install Go and Hugo. For instructions, see: http://gohugo.io/overview/installing/ +1. Install Go and Hugo. For instructions, see: http://gohugo.io/overview/installing/. Since the Hugo version on the server is v0.74.3, best install the same version when testing locally. Using newer version might generate errors in building the website. + 2. Clone the website repository: ``` git clone https://github.com/MIT-eicu/eicu-code.git ``` 3. Change to the "website" directory 4. Run ```hugo server``` at the command line to build the website and serve the pages; -5. View the website at: http://127.0.0.1:1313 +## Update website + +1. Fork eicu-code repository to your own GitHub space if you are not owner of the oringal MIT-LCP/eicu-code repo. + +2. Create a new branch and make change locally. + +3. After testing the website, make a pull request on MIT-LCP/eicu-code repo. + + +## Deployment of the website +(For LCP lab members only) + +1. Add eicu-website to remote + After the pull request of the new material is merged into the main branch of eicu-code, pull down the latest version of "main" branch to your local repo. And then run the following command locally. + + `git remote add eicu-website webuser@:/home/webuser/eicu-website.git` + + * Optional: Check if the command above ran correctly, + Run command: `git remote -v` + should return: + eicu-website webuser@:/home/webuser/eicu-website.git (fetch) + eicu-website webuser@<1IP address>:/home/webuser/eicu-website.git (push) + origin https://www.github.com/MIT-LCP/eicu-code (fetch) + origin https://www.github.com/MIT-LCP/eicu-code (push) + +2. Sshuttle into the production server + (Skip if you are within the LCP secure network) + + Run the following command after filling in the LCP username: `alias sshholyoke="sshuttle -r helios.mit.edu "` + + Run command: `sshholyoke` + + Should return: “client: Connected” after you enter your password + +3. Push development + + In another terminal from your mimic-website repo: + + Run command: `git push eicu-website` + + * Note: + Your public key (for the machine you're pushing from) must be in the webuser group From af8bb1be62522d28448471c77294ffab436299db Mon Sep 17 00:00:00 2001 From: Sicheng Hao Date: Mon, 12 Sep 2022 18:56:27 -0400 Subject: [PATCH 2/2] updated testing and deployment guide --- website/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/README.md b/website/README.md index 6c7dca9..84ea493 100644 --- a/website/README.md +++ b/website/README.md @@ -24,7 +24,7 @@ (For LCP lab members only) 1. Add eicu-website to remote - After the pull request of the new material is merged into the main branch of eicu-code, pull down the latest version of "main" branch to your local repo. And then run the following command locally. + After the pull request of the new material is merged into the main branch of eicu-code, pull down the latest version of "main" branch to your local repo. And then run the following command locally after filling up the IP address. `git remote add eicu-website webuser@:/home/webuser/eicu-website.git` @@ -32,14 +32,14 @@ Run command: `git remote -v` should return: eicu-website webuser@:/home/webuser/eicu-website.git (fetch) - eicu-website webuser@<1IP address>:/home/webuser/eicu-website.git (push) + eicu-website webuser@:/home/webuser/eicu-website.git (push) origin https://www.github.com/MIT-LCP/eicu-code (fetch) origin https://www.github.com/MIT-LCP/eicu-code (push) 2. Sshuttle into the production server (Skip if you are within the LCP secure network) - Run the following command after filling in the LCP username: `alias sshholyoke="sshuttle -r helios.mit.edu "` + Run the following command after filling in the LCP username and IP address: `alias sshholyoke="sshuttle -r helios.mit.edu "` Run command: `sshholyoke`