error "gatsby-source-github-api" threw an error while running the sourceNodes lifecycle: token is undefined #29166
-
Hello community! I am new to Gatsby and just tried a GH Actions workflow for my site today. I see this error at the build stage:
I am using this to pull all repos on my Github into the site. What I have tried so far:
Versions: This is my node.js.yml GH Actions workflow file:
Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
So it was the .env file which wasn't being pushed to Github. So I needed to make the token available to the GH Action build somehow. I tried the action SpicyPizza/create-envfile@v1. It isn't supported by Github but seemed to do the job. It creates a .env file at build with the keys you provide it. You could also create a .env file manually. See thread. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue, please help |
Beta Was this translation helpful? Give feedback.
So it was the .env file which wasn't being pushed to Github. So I needed to make the token available to the GH Action build somehow. I tried the action SpicyPizza/create-envfile@v1. It isn't supported by Github but seemed to do the job. It creates a .env file at build with the keys you provide it.
You could also create a .env file manually. See thread.