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

Use GH actions to deploy to Firebase on merge to master #13

Open
luketlancaster opened this issue Apr 8, 2020 · 6 comments
Open

Use GH actions to deploy to Firebase on merge to master #13

luketlancaster opened this issue Apr 8, 2020 · 6 comments

Comments

@luketlancaster
Copy link
Owner

Also update the db?

@michaelclark2
Copy link
Collaborator

ive been able to deploy to heroku using github actions, i'm sure firebase deploy would be much easier, updating the db as in pulling down the student json might be a little tricky though

@luketlancaster
Copy link
Owner Author

I think updating the db would be as "simple" as grabbing the files in /database and then doing a POST to the corresponding collections on firebase. Then we treat these files as the source of truth, and only update them, never manually updating the locations in firebase. Shouldn't be too hard to write a little script that the GH action calls, or that npm run deploy does after a deploy

@michaelclark2
Copy link
Collaborator

Oh you mean uploading the json, not downloading it, gotcha. The problem with that is the pre-work scraper updates it on firebase, so everytime you would upload the json file the percentages would reset

@luketlancaster
Copy link
Owner Author

yeah so the flow would change for that. The scraper would update a local file(s), then you'd create a PR. That way every dev wouldn't have to download the JSON from firebase before starting work, they'd just need to keep GH updated.

@luketlancaster
Copy link
Owner Author

Current issue: the apiKeys file is needed in the build, so that currently fails on CD. Couple of options:

  1. Configure a server somewhere to accept a HTTP request to build + deploy, and hit that endpoint from the GH actions.
  2. Store the API keys in the GH secrets section, and during the build use them to populate that untracked file.

number 2 is probably the way to go...because number 1 seems pretty hacky. Or we can just close this and accept that we need to manually build/deploy 🙃

@luketlancaster
Copy link
Owner Author

in the meantime I've disabled actions, so they won't run and fail all the time, until I can circle back to this

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