Reputation: 10565
For a while I've been serving a website off of Google's cloud storage. Since I don't modify it very much, it has always been a pain every time I need to change some code or fix some typo. My normal workflow is the following:
Edit code on local machine->push to github->copy code from local machine to GCS using gsutils
I recently came across this: https://cloud.google.com/tools/repo/cloud-repositories#push_to_a_web-hosted_repository
It looks like google cloud apps can now be auto-deployed from github. However, the example is for app engine, not cloud storage. Is there a way to auto-deploy to GCS?
Upvotes: 1
Views: 1510
Reputation: 35054
Here is a "Git to GCS" Github Action I made for that few days ago: https://github.com/marketplace/actions/git-to-gcs
The steps described in README are specifically for heaving a public bucket but it's unnecessary. And the repo does not have to be public at all -- I made mine public just to allow looking at my workflow file. Maybe I'll move it to README later.
Upvotes: 2
Reputation: 3711
Cloud Build will do what you want. Builds can be triggered by commits, tag commits, etc. and you can push the code to Cloud Storage.
Upvotes: 0
Reputation: 4692
If you want a "direct deploy" from git to GCS... then no, I don't see how you can. the Git-Appengine link is a feature in itself, one that is not extended to GCS.
Using something like Satyam mentions could work though.
Upvotes: 0
Reputation: 1140
You can try setting up jenkins for the same which keeps polling github for changes and you can setup set of tasks to be performed.
Upvotes: 1