Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Nakilon/git-to-gcs
Sync Google Cloud Storage buckets with git repo directories
https://github.com/Nakilon/git-to-gcs
gcp gcp-storage git-integration github-actions google-cloud-platform google-cloud-storage gsutil website-development
Last synced: 3 months ago
JSON representation
Sync Google Cloud Storage buckets with git repo directories
- Host: GitHub
- URL: https://github.com/Nakilon/git-to-gcs
- Owner: Nakilon
- License: mit
- Created: 2020-05-15T19:21:41.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-16T20:46:28.000Z (over 4 years ago)
- Last Synced: 2024-04-10T17:55:33.172Z (7 months ago)
- Topics: gcp, gcp-storage, git-integration, github-actions, google-cloud-platform, google-cloud-storage, gsutil, website-development
- Language: Ruby
- Homepage: https://github.com/marketplace/actions/git-to-gcs
- Size: 7.81 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
After pushing to the master branch of the repository that uses this Github Action contents of its directories will be syncronized with corresponding Google Cloud Storage buckets.
---
For example I am now updating my home page using it. If you want to do the same see the following steps. Note that if you don't want to have a public web page and just want to use it to "git push to the bucket" you don't have to neither make your repo public nor add the AllUsers user.
1. make a public static website bucket as explained in relevant [GCP docs](https://cloud.google.com/storage/docs/hosting-static-website)
2. create a Service account without any permissions and download its key file
3. add it in the bucket's permissions settings as Object Admin (finding it by its email)
4. make a Github repo and a directory in it with the same name as your bucket (designed to be able to update multiple buckets from a single repo)
5. in the Secrets tab of repo settings add a secret named "secrets" in the folllowing format: ` ...`
6. add a Workflow to your repo like this: https://github.com/Nakilon/www-nakilon-pro/blob/master/.github/workflows/sync_with_gcs.yaml---
**Warning:** files that are missing from the repo will be deleted from the bucket. They'll still remain in the git history so it's dangerous only when you use this thing the first time.