Skip to content

Commit

Permalink
Make deployment tag a choice and fix origin branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaczero committed Dec 2, 2024
1 parent 32808e8 commit 28da084
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ on:
tag:
description: 'Deployment tag'
required: true
type: string
type: type
default: 'main'
options:
- main
- dev

jobs:
deploy:
Expand Down Expand Up @@ -103,9 +106,9 @@ jobs:
echo "Fetching latest changes from the git repository"
cd "$tag"
git fetch origin "$tag"
git checkout "$tag"
git reset --hard "origin/$tag"
git fetch origin main
git checkout main
git reset --hard origin/main
echo "Restarting containers"
docker compose down --remove-orphans
Expand Down

0 comments on commit 28da084

Please sign in to comment.