We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0105ae commit 51f6cd4Copy full SHA for 51f6cd4
post-build.sh
@@ -18,15 +18,17 @@ echo ">>>Running post-build.sh"
18
19
#!/bin/bash
20
21
-# Create dist branch if it doesn't exist already
22
-if ! git show-ref --verify --quiet refs/heads/dist; then
23
- # Delete the dist branch locally
24
- git branch -D dist
+# Check if the dist branch exists remotely
+if git ls-remote --exit-code --heads origin dist; then
+ # Delete the dist branch locally if it exists
+ if git show-ref --verify --quiet refs/heads/dist; then
25
+ git branch -D dist
26
+ fi
27
# Delete the dist branch remotely
28
git push origin --delete dist
29
fi
30
-git checkout -b dist
31
+git checkout -b dist main
32
33
# Add and commit the changes to the dist folder
34
git add dist
0 commit comments