Replies: 1 comment 7 replies
-
If you have .env file like this You can try to useGITHUB_TOKEN=your token
then use it anywhere like- this is example const headers = { Or you can try to use it as environment secret
|
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
General
Body
I'm using a github PAT that is scoped to just "Access public repos" for my profile website, which is to be hosted on github pages. However, github automatically removes generated tokens if it finds a token in a repo. With a bit of resources I came across how one can use environment variables to access keys but all of them are only for apps created in react.
I've currently created a new env for my repo, and added the secret to it, lets say API_KEY. When I call it on my github pages website, it says process is not defined (process.env.API_KEY).
How do I configure a key for a plain JS website?
Beta Was this translation helpful? Give feedback.
All reactions