1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-22 17:23:22 +01:00

add warning when GATSBY_GITHUB_TOKEN is not present

* closes  #372
This commit is contained in:
Matthias Kretschmann 2020-09-23 20:33:03 +00:00
parent 33620b5a9a
commit 6897ffc463
3 changed files with 12 additions and 1 deletions

View File

@ -1 +1 @@
#GATSBY_GITHUB_TOKEN=
GATSBY_GITHUB_TOKEN=xxx

View File

@ -158,6 +158,7 @@ git clone git@github.com:kremalicious/portfolio.git
cd portfolio/
# GATSBY_GITHUB_TOKEN is required for some parts
# See https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
cp .env.sample .env
vi .env

View File

@ -8,6 +8,16 @@ const { name, website } = resume.basics
require('dotenv').config()
if (
!process.env.GATSBY_GITHUB_TOKEN ||
process.env.GATSBY_GITHUB_TOKEN === 'xxx'
) {
throw Error(`
A GitHub token as GATSBY_GITHUB_TOKEN is required to build some parts of the blog.
Check the README https://github.com/kremalicious/portfolio#-development.
`)
}
module.exports = {
siteMetadata: {
siteUrl: `${website}`