-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Github Setup For Open Source Projects
Generate a Github personal access token using these instructions. Make sure you don't select any scope just generate a simple token
Tokens are used to access the Github API, and is used to get your contents from Github, about your profile and also your Pinned Repositories. See the sections Github Profile and Open Source sections.
-
Open a command prompt windows(⊞ Win+R; type cmd and enter)
-
Type the below command replacing
<GitHub personal access token>
with your Access token which you got from Github.setx REACT_APP_GITHUB_TOKEN "<GitHub personal access token>"
What this command does is it creates an environment variable
REACT_APP_GITHUB_TOKEN
with your Github Access tokens. This will be permanent and can be used in all future build. -
Then create another environment variable
GITHUB_USERNAME
to point to your Github username.setx GITHUB_USERNAME "<Your Github Username>"
-
Finally, follow the other steps in ReadMe and then deploy it to Github or create production pages.
-
Open a Terminal(Alt+Ctrl+T).
-
Type the below command replacing
<GitHub personal access token>
with your Access token which you got from Github.export REACT_APP_GITHUB_TOKEN="<GitHub personal access token>"
This command sets the environment variable
REACT_APP_GITHUB_TOKEN
which is used while building the site. -
Then create another environment variable
GITHUB_USERNAME
to point to your Github username.export GITHUB_USERNAME="<GitHub username>"
-
Finally, follow the other steps in ReadMe and then deploy it to Github or create production pages.
Set showGithubProfile
to true or false to show Contact Profile using Github, defaults to false.
Note: Open Source Projects section only show pinned items of your Github. If you are seeing
Please follow these instructions to select which repositories to pin on your profile.