Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update website testing and deployment guide #204

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 44 additions & 2 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 after filling up the IP address.

`git remote add eicu-website webuser@<IP address>:/home/webuser/eicu-website.git`

* Optional: Check if the command above ran correctly,
Run command: `git remote -v`
should return:
eicu-website webuser@<IP address>:/home/webuser/eicu-website.git (fetch)
eicu-website webuser@<IP 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 and IP address: `alias sshholyoke="sshuttle -r <Username>helios.mit.edu <IP address, replace last section with 0/24>"`

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