Commit 63f5ce9b authored by Mark Lodato's avatar Mark Lodato
Browse files

Read GitHub personal access token from ~/.netrc.

Reference: https://github.com/jekyll/github-metadata/blob/master/docs/authentication.md#2-netrc

Signed-off-by: default avatarMark Lodato <lodato@google.com>
parent be41a474
source "https://rubygems.org" source "https://rubygems.org"
gem 'github-pages', group: :jekyll_plugins gem 'github-pages', group: :jekyll_plugins
gem 'netrc'
...@@ -233,6 +233,7 @@ GEM ...@@ -233,6 +233,7 @@ GEM
jekyll-seo-tag (~> 2.1) jekyll-seo-tag (~> 2.1)
minitest (5.15.0) minitest (5.15.0)
multipart-post (2.1.1) multipart-post (2.1.1)
netrc (0.11.0)
nokogiri (1.13.0) nokogiri (1.13.0)
mini_portile2 (~> 2.7.0) mini_portile2 (~> 2.7.0)
racc (~> 1.4) racc (~> 1.4)
...@@ -281,6 +282,7 @@ PLATFORMS ...@@ -281,6 +282,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
github-pages github-pages
netrc
BUNDLED WITH BUNDLED WITH
2.1.4 2.1.4
...@@ -28,14 +28,24 @@ via GitHub pages and rendered with Jekyll. ...@@ -28,14 +28,24 @@ via GitHub pages and rendered with Jekyll.
bundle install bundle install
``` ```
4. Run the project locally with `jekyll serve` (optionally appending 4. (optional) Create a GitHub
[personal access token](https://github.com/settings/tokens/new) and add it
to your `~/.netrc`, like so:
```none
machine api.github.com
login github-username
password 123abc-your-token
```
5. Run the project locally with `jekyll serve` (optionally appending
`--livereload`): `--livereload`):
```bash ```bash
bundle exec jekyll serve bundle exec jekyll serve
``` ```
5. Browse to http://localhost:4000 to view the site locally. 6. Browse to http://localhost:4000 to view the site locally.
## Deployment ## Deployment
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment