From 3d490c5db0c23fc58fe96062d53460f37f0067ac Mon Sep 17 00:00:00 2001 From: Samer Albahra Date: Mon, 25 Nov 2024 22:04:58 -0500 Subject: [PATCH 1/3] Attempt fix for deployment on merge --- .github/workflows/firebase-hosting.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/firebase-hosting.yml b/.github/workflows/firebase-hosting.yml index c7c6a31e..c15bb4ad 100644 --- a/.github/workflows/firebase-hosting.yml +++ b/.github/workflows/firebase-hosting.yml @@ -43,3 +43,4 @@ jobs: firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_OPENSPRINKLER_UI }} projectId: opensprinkler-ui target: opensprinkler-betaui + channelId: From 7c1fff8f939927562b96d49a69582c55d19a1c39 Mon Sep 17 00:00:00 2001 From: Samer Albahra Date: Mon, 25 Nov 2024 22:11:34 -0500 Subject: [PATCH 2/3] Fix deployment using devui instead of betaui --- .github/workflows/firebase-hosting.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/firebase-hosting.yml b/.github/workflows/firebase-hosting.yml index c15bb4ad..6c20ed46 100644 --- a/.github/workflows/firebase-hosting.yml +++ b/.github/workflows/firebase-hosting.yml @@ -42,5 +42,5 @@ jobs: repoToken: ${{ secrets.GITHUB_TOKEN }} firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_OPENSPRINKLER_UI }} projectId: opensprinkler-ui - target: opensprinkler-betaui - channelId: + target: opensprinkler-devui + channelId: ${{ github.event_name == 'push' && 'live' || '' }} From bc20b5a4470a417096ef80eeb7996fdfe73f185f Mon Sep 17 00:00:00 2001 From: Samer Albahra Date: Mon, 25 Nov 2024 22:13:03 -0500 Subject: [PATCH 3/3] Fix deployment issue --- firebase.json | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/firebase.json b/firebase.json index 01f2b789..4aba9b52 100644 --- a/firebase.json +++ b/firebase.json @@ -75,6 +75,44 @@ ] } ] + }, + { + "site": "opensprinkler-devui", + "public": "build/firmware", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "headers": [ + { + "source": "**/*", + "headers": [ + { + "key": "Access-Control-Allow-Origin", + "value": "*" + } + ] + }, + { + "source": "**/*.@(jpg|jpeg|gif|png|svg|webp)", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=3600, s-maxage=31536000" + } + ] + }, + { + "source": "**/*.@(js|css)", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=3600, s-maxage=31536000" + } + ] + } + ] } ] }