Open root

Upload Files to Google Cloud Storage via a GitHub Action

If your webpage sources are hosted on GitHub, stored on Google Cloud Storage (GCS), and distributed via Google Cloud Platform (GCP), your infrastructure lends itself to automation. If you have been manually updating GCS with new sources, you can save yourself time and minimize latency with GitHub Actions. You can think of actions as scripts that are triggered via git hooks. For instance, the infrastructure described above could be automated by creating an action which maps raw source files (i.e. a directory of Markdown files) to another format (i.e. a directory of HTML files) then uploads them to GCS via gsutil. A comprehensive tutorial for creating such an action is detailed in Automatic Upload to Google Cloud Storage with GitHub Actions.