From c2ce8d76418d6730eadd364ad49e11f507403949 Mon Sep 17 00:00:00 2001 From: Khanh Nguyen Date: Thu, 4 Jan 2024 15:17:46 -0800 Subject: [PATCH] Add a Cloud Build config to deploy website to Firebase. (#5447) As the title says. This is the Cloud Build configuration that we'll use to build dart.dev and publish to Firebase hosting. Note: This current config currently publishes to a staging Flutter project to confirm everything works on main. Once this PR lands and we've confirmed deploy works as expected, - [ ] I'll open another PR to switch to prod project `dart-dev` - [ ] Decommission the [deploy.yaml GitHub action](https://github.com/dart-lang/site-www/blob/main/.github/workflows/deploy.yml). - [ ] Update the trigger branch to `main` cc @drewroengoogle @parlough --- cloud_build/deploy.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cloud_build/deploy.yaml diff --git a/cloud_build/deploy.yaml b/cloud_build/deploy.yaml new file mode 100644 index 0000000000..ee38730af7 --- /dev/null +++ b/cloud_build/deploy.yaml @@ -0,0 +1,19 @@ +steps: + - name: gcr.io/cloud-builders/git + args: ['submodule', 'update', '--init', '--recursive'] + - name: gcr.io/cloud-builders/docker + entrypoint: '/bin/bash' + args: + - '-c' + - |- + set -e + echo "Building the website using a makefile..." + make build + - name: gcr.io/flutter-dev-230821/firebase-ghcli + entrypoint: '/bin/bash' + args: + - '-c' + - |- + firebase deploy --project=flutter-website-staging-349021 --only=hosting +options: + logging: CLOUD_LOGGING_ONLY