From af771ef25f6a2e98fee4bb9163eef09ba24bd0b7 Mon Sep 17 00:00:00 2001 From: Owen Barton Date: Mon, 29 Jan 2024 17:15:07 -0800 Subject: [PATCH 1/2] Deploy preview build to long lived preview channel site. --- ...base-deploy-live.yml => firebase-deploy.yml} | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) rename .github/workflows/{firebase-deploy-live.yml => firebase-deploy.yml} (70%) diff --git a/.github/workflows/firebase-deploy-live.yml b/.github/workflows/firebase-deploy.yml similarity index 70% rename from .github/workflows/firebase-deploy-live.yml rename to .github/workflows/firebase-deploy.yml index 25784205..46823ac8 100644 --- a/.github/workflows/firebase-deploy-live.yml +++ b/.github/workflows/firebase-deploy.yml @@ -6,6 +6,7 @@ name: Deploy to Firebase Hosting on merge, content update and schedule push: branches: - main + - drafts repository_dispatch: types: [created] schedule: @@ -33,7 +34,7 @@ jobs: ${{ runner.os }}-gatsby-build- - name: Yarn install run: 'yarn install --frozen-lockfile' - - name: Build + - name: Build production run: yarn build env: STRAPI_API_URL: '${{ secrets.STRAPI_API_URL }}' @@ -41,6 +42,18 @@ jobs: - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CA_IT_PROD_HOME_5918 }}' + firebaseSeviceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CA_IT_PROD_HOME_5918 }}' channelId: live projectId: ca-it-prod-home-5918 + - name: Build staging + run: yarn build + env: + STRAPI_API_URL: '${{ secrets.STRAPI_API_URL }}' + STRAPI_TOKEN: '${{ secrets.STRAPI_TOKEN }}' + GATSBY_IS_PREVIEW: true + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CA_IT_PROD_HOME_5918 }}' + channelId: preview + projectId: ca-it-prod-home-5918 From cad9d950aaf7d5d899dda468a6a9a3b1a6bd0390 Mon Sep 17 00:00:00 2001 From: Owen Barton Date: Mon, 29 Jan 2024 17:25:05 -0800 Subject: [PATCH 2/2] Replace missing letter. --- .github/workflows/firebase-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-deploy.yml b/.github/workflows/firebase-deploy.yml index 46823ac8..dd073cab 100644 --- a/.github/workflows/firebase-deploy.yml +++ b/.github/workflows/firebase-deploy.yml @@ -42,7 +42,7 @@ jobs: - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseSeviceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CA_IT_PROD_HOME_5918 }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_CA_IT_PROD_HOME_5918 }}' channelId: live projectId: ca-it-prod-home-5918 - name: Build staging