Skip to content

Commit 80247ad

Browse files
committed
fix: Handle already-active version error in Firebase deploy
1 parent 86d4a24 commit 80247ad

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/firebase-hosting-merge.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,11 @@ jobs:
2424
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_REACT_VITE_TAILWIND_TEMPLATE }}
2525

2626
- name: Deploy to Firebase Hosting
27-
run: npx firebase-tools@latest deploy --only hosting --project react-vite-tailwind-template --non-interactive
27+
run: |
28+
OUTPUT=$(npx firebase-tools@latest deploy --only hosting --project react-vite-tailwind-template --non-interactive 2>&1)
29+
DEPLOY_EXIT=$?
30+
echo "$OUTPUT"
31+
if [ $DEPLOY_EXIT -ne 0 ]; then
32+
echo "$OUTPUT" | grep -q "is the current active version" || exit $DEPLOY_EXIT
33+
echo "Skipping: already the current active version."
34+
fi

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ dist-ssr
2626
*.njsproj
2727
*.sln
2828
*.sw?
29+
branch_structure.json
30+
temp_auto_push.bat
31+
temp_interactive_push.bat

0 commit comments

Comments
 (0)