Skip to content

Commit

Permalink
Update cd_pipeline.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
arpita0911patel authored May 17, 2024
1 parent 5284315 commit a25f306
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/cd_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ jobs:
echo "Removing existing temp deployment folder"
git worktree remove github-pages-deploy-action-temp-deployment-folder --force
fi
if git worktree list | grep -q '\[main\]'; then
echo "Removing existing main worktree"
git worktree remove $(git worktree list | grep '\[main\]' | awk '{print $1}') --force
# Check and remove any worktree associated with the deployment if it exists
if git worktree list | grep -q 'github-pages-deploy-action'; then
echo "Removing existing deployment worktree"
DEPLOYMENT_WORKTREE=$(git worktree list | grep 'github-pages-deploy-action' | awk '{print $1}')
git worktree remove "$DEPLOYMENT_WORKTREE" --force
fi
- name: Download a Build Artifact Version
uses: dawidd6/[email protected]
with:
Expand Down

0 comments on commit a25f306

Please sign in to comment.