File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments