Code Monkey home page Code Monkey logo

git-to-gcs's Introduction

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
  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: <bucket1 name> <base64 of the key file> <bucket2 name> <base64 of the key file> ...
  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.

git-to-gcs's People

Contributors

nakilon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sgurly

git-to-gcs's Issues

Run nakilon/git-to-gcs@1 Failing

I have done the steps as shown in the readme, but my flow keeps on failing.
It says something like:

/main.rb:5:in `fetch': key not found: "images" (KeyError) from /main.rb:5:in `block in <main>' from /main.rb:3:in `each' from /main.rb:3:in `<main>'
Here is an image for the same:
image
I am pretty sure that I have entered the right secrets, but don't know why it's happening.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.