Skip to content

Commit

Permalink
update deploy.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
app-harry committed Oct 26, 2024
1 parent d33fcf2 commit 0f8ad2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 6 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ build() {

setup_gh() {
# Delete the branch if it exists, and create a new one
git branch -D "$PAGES_BRANCH"
if git show-ref --verify --quiet "refs/heads/$PAGES_BRANCH"; then
echo "Branch '$PAGES_BRANCH' exists. Deleting it..."
git branch -D "$PAGES_BRANCH" # Delete the local branch
else
echo "Branch '$PAGES_BRANCH' does not exist locally. Skipping deletion."
fi

# Create and switch to the new branch
git checkout -b "$PAGES_BRANCH"
Expand Down
2 changes: 0 additions & 2 deletions scaffold.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
puts "Deleted: #{file_path}"
end
end
puts "All files have been removed from #{destination_dir}."
else
FileUtils.mkdir_p(destination_dir)
puts "Directory #{destination_dir} does not exist."
end

# Copy all files and directories while preserving the structure
Expand Down

0 comments on commit 0f8ad2b

Please sign in to comment.