Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making protected Google Sheet content available via GitHub Actions #3

Open
superjai opened this issue Jun 28, 2021 · 1 comment
Open

Comments

@superjai
Copy link
Collaborator

superjai commented Jun 28, 2021

Hey @bbest. Here's an issue that I think is worth working on - using GitHub Actions to make protected Google Sheets content available for InfographiqJS.

So, the problem that we have faced is that NOAA-owned Google Sheets can't be made visible to the public. This issue has been addressed for Infographiq in the R context using InfographiqR::ocnms_get_sheet().

However, this solution won't work for Javascript-only versions of Infographiq, such as for the Florida Keys IEA or the responsive table. As a work around, we have been using Google Sheets not owned by NOAA for these instances, as we can make them visible to the public.

But I have a feeling that, if Infographiq is to get wide usage within NOAA, they are going to want to use NOAA-owned Google Sheets. So, how to do this?

One straightforward approach would be to use InfographiqR::ocnms_get_sheet (or a slightly altered version of it) within a GitHub Action. On some frequency (once a day/week/whatever), an Action could run that would copy the latest version of a desired protected Google Sheet into a csv that is URL-accessible. That csv could then be read by the Infographiq Javascript.

What do you think?

@bbest
Copy link
Contributor

bbest commented Jun 29, 2021

That's one of handling this. The infographiqR::ocnms_get_sheet()uses non-interactive-auth to get access to the sheet by sharing with the email address [email protected] which I setup as a Google Service account (see test_gs4_auth.Rmd for details).

What I worry about losing is the instant update with the Florida Keys IEA. By adding this Github Action dependency, there's a delay and possibility of an error / something going wrong before it updates. As much as possible I'd encourage is creating a Google Sheet with read permissions (so outside NOAA or with NOAA admin sorting this out) and inviting any NOAA user to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants