I would like to get info from GitHub API from browser JS on my website hosted on Heroku.
I have thought of two ways to do this:
Hide an API key in a config var and read the config var in JS
I went with this option and I ran into an issue:
To hide the API key I would need to make a config var in the settings of my project, then read it using browser (not Node) JavaScript. I currently am stuck on reading the config var using JS.
Through a GitHub workflow run on push (or whatever event)
This is an advantage because I can read the repo from inside a workflow and not need to use a key (I think). Then the workflow would write data to a file on the website.