Skip to content

Commit

Permalink
fix: change Github Contributor plugin config env vars (#21)
Browse files Browse the repository at this point in the history
For Github Actions, we can't use any env vars that are prefixed with `GITHUB_` since those are reserved.
  • Loading branch information
shazron authored Sep 15, 2020
1 parent d8e4129 commit 5fac4f6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ Only `READ` permissions on repositories are required for the token.
For example, if your doc site repo was at https://github.com/adobe/gatsby-theme-parliament using the `main` branch, this would be what your `.env` would look like:

```properties
GITHUB_TOKEN=YOUR_PERSONAL_ACCESS_TOKEN_HERE
GITHUB_REPO_OWNER=adobe
GITHUB_REPO_NAME=gatsby-theme-parliament
GITHUB_REPO_BRANCH=main
ROOT=example
REPO_GITHUB_TOKEN=YOUR_PERSONAL_ACCESS_TOKEN_HERE
REPO_OWNER=adobe
REPO_NAME=gatsby-theme-parliament
REPO_BRANCH=main
REPO_ROOT=example
```

By default, you can omit the `ROOT` env var, and it should use the root folder as the source of the documentation pages. If your site is in a sub-folder, add the relative path as the `ROOT`.
Expand Down
10 changes: 5 additions & 5 deletions example/.env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GITHUB_TOKEN=
GITHUB_REPO_OWNER=adobe
GITHUB_REPO_NAME=gatsby-theme-parliament
GITHUB_REPO_BRANCH=main
ROOT=example
REPO_GITHUB_TOKEN=
REPO_OWNER=adobe
REPO_NAME=gatsby-theme-parliament
REPO_BRANCH=main
REPO_ROOT=example
GATSBY_LAUNCH_SRC=
GATSBY_LAUNCH_SRC_INCLUDE_IN_DEVELOPMENT=
10 changes: 5 additions & 5 deletions packages/gatsby-theme-parliament/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ module.exports = {
{
resolve: `@adobe/gatsby-source-github-file-contributors`,
options: {
root: process.env.ROOT,
root: process.env.REPO_ROOT,
repo: {
token: process.env.GITHUB_TOKEN,
owner: process.env.GITHUB_REPO_OWNER,
name: process.env.GITHUB_REPO_NAME,
branch: process.env.GITHUB_REPO_BRANCH
token: process.env.REPO_GITHUB_TOKEN,
owner: process.env.REPO_OWNER,
name: process.env.REPO_NAME,
branch: process.env.REPO_BRANCH
}
}
},
Expand Down

0 comments on commit 5fac4f6

Please sign in to comment.