Skip to content

Commit f8afb54

Browse files
authored
fix: Consolidates all steps for creating and merging dist into release workflow. (#145)
1 parent 19b1a8b commit f8afb54

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ jobs:
7878
- name: Deploy to Firebase Hosting
7979
run: firebase deploy --only hosting
8080

81-
- name: Checkout dist branch
81+
- name: Check for existing 'dist' branch
8282
run: |
83-
git fetch origin
84-
git branch -D dist || true
85-
git checkout -b dist
83+
if git ls-remote --exit-code --heads origin dist;
84+
then
85+
git push origin --delete dist
86+
fi
8687
87-
- name: Add and commit build output
88+
- name: Create and push new 'dist' branch
8889
run: |
89-
git add .
90+
git checkout -b dist
91+
git add dist
9092
git commit -m "Automated build output"
91-
92-
- name: Push to dist branch
93-
run: git push origin dist --force
93+
git push origin dist
9494
9595
approve-and-merge:
9696
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)