File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change 7575 - name : Deploy to Firebase Hosting
7676 run : firebase deploy --only hosting
7777
78- - name : Post Build
79- run : samples/post-build.sh
78+ - name : Check if the dist branch exists remotely
79+ run : |
80+ if git ls-remote --exit-code --heads origin dist; then
81+ # Delete the dist branch locally if it exists
82+ if git show-ref --verify --quiet refs/heads/dist; then
83+ git branch -D dist
84+ fi
85+ # Delete the dist branch remotely
86+ git push origin --delete dist
87+ fi
88+
89+ - name : Checkout and create dist branch from main
90+ run : git checkout -b dist main
91+
92+ - name : Add and commit changes to the dist folder
93+ run : |
94+ git add dist
95+ git add index.html
96+ if [[ -n $(git status --porcelain) ]]; then
97+ git commit -m "Update dist folder"
98+ git push origin dist
99+ else
100+ echo "No changes to commit"
80101
81102 approve-and-merge :
82103 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments