Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/explooosion/react-gcp-deploy-example
Build and deploy react app to GCP Cloud Run with Github Actions
https://github.com/explooosion/react-gcp-deploy-example
cloud-run deploy gcp react
Last synced: 6 days ago
JSON representation
Build and deploy react app to GCP Cloud Run with Github Actions
- Host: GitHub
- URL: https://github.com/explooosion/react-gcp-deploy-example
- Owner: explooosion
- Created: 2020-10-08T11:33:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-10T13:18:49.000Z (over 4 years ago)
- Last Synced: 2024-11-25T00:12:05.235Z (2 months ago)
- Topics: cloud-run, deploy, gcp, react
- Language: JavaScript
- Homepage: https://create-react-app-2w7qqxwz2q-uc.a.run.app/
- Size: 208 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React GCP Deploy Example
Build your app to docker image, publish and deploy on GCP [Cloud Run](https://console.cloud.google.com/run) with github actions.
Blog: [GCP - 使用 Github Actions 部署 React 到 Cloud Run](https://dotblogs.com.tw/explooosion/2020/10/09/143330)
# Configuration
1. Create GCP [project](https://console.cloud.google.com/projectcreate)
2. Creating [service account keys](https://cloud.google.com/iam/docs/creating-managing-service-account-keys)
3. Download json key look like this:
```json
{
"type": "service_account",
"project_id": "project-id",
"private_key_id": "key-id",
"private_key": "-----BEGIN PRIVATE KEY-----\nprivate-key\n-----END PRIVATE KEY-----\n",
"client_email": "service-account-email",
"client_id": "client-id",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/service-account-email"
}
```4. Create Github Secrets
- GCP_SA_EMAIL
- GCP_SA_KEY (paste json file)
- GCP_PROJECT_ID5. Add `main.yml` to your project
6. Add `Dockerfile` to your project
7. Push your project to Github repo
6. Run Github Actions