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

Added GitHub Pages activation step to Unit 7 #54

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
18 changes: 17 additions & 1 deletion docs/unit7.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,22 @@ This will run the react app, and you will be able to see it in your browser. It

![React Compiled Terminal Output](../static/img/unit7/react-compiled.png)

## Setting Up GitHub Pages

If you don't have Github Pages set up yet, here's a quick recap.
**GitHub Pages allows us to deploy our site quickly, easily, and for free**.

To activate GitHub pages for your repository:
1. Click on the “Settings” tab
2. Click “Pages”
3. Select “main” as your Source Branch
4. Click “Save”
5. Check “Enforce HTTPS”

![GitHub Pages](../static/img/unit4/gh-pages.png)

Now, whenever you push a new commit to the `main` branch of your repository, the website will be **automatically updated**.

## Deploying React to GitHub Pages

We can also share our new React website with GitHub Pages as well! This is a little less straightforward, since we are using React. We are going to have to install `gh-pages` , a node module that lets us publish to GitHub pages.
Expand Down Expand Up @@ -481,4 +497,4 @@ React has a lot of resources on its own website, that are really useful

A very cool React Tutorial

- [https://react-tutorial.app/app.html](https://react-tutorial.app/app.html)
- [https://react-tutorial.app/app.html](https://react-tutorial.app/app.html)