File tree Expand file tree Collapse file tree 1 file changed +8
-24
lines changed
Expand file tree Collapse file tree 1 file changed +8
-24
lines changed Original file line number Diff line number Diff line change 5353
5454 - run : npm i
5555 - run : npm run build-all
56-
57- - name : Check if the dist branch exists remotely
58- run : |
59- if git ls-remote --exit-code --heads origin dist; then
60- # Delete the dist branch locally if it exists
61- if git show-ref --verify --quiet refs/heads/dist; then
62- git branch -D dist
63- fi
64- # Delete the dist branch remotely
65- git push origin --delete dist
66- fi
67-
68- - name : Checkout and create dist branch from main
69- run : git checkout -b dist main
70-
71- - name : Add and commit changes to the dist folder
72- run : |
73- git add dist
74- if [[ -n $(git status --porcelain) ]]; then
75- git commit -m "Update dist folder"
76- git push origin dist
77- else
78- echo "No changes to commit"
79- fi
8056
8157 - uses : google-github-actions/auth@v1
8258 with :
8763
8864 - name : Deploy to Firebase Hosting
8965 run : firebase deploy --only hosting
66+
67+ - name : Force Checkout dist and Overwrite
68+ run : |
69+ git fetch origin main
70+ git checkout -B dist origin/main
71+ git add dist
72+ git commit -m "Update dist folder"
73+ git push --force origin dist
You can’t perform that action at this time.
0 commit comments