Skip to content

Commit

Permalink
Update deploy_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Garima Ketan Chauhan authored and GitHub Enterprise committed Apr 2, 2025
1 parent 6266be0 commit 242e5cc
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
- name: Remove previous production containers (if any)
run: docker rm -f secfit_stag_backend || true # Remove any previous containers

- name: Tear down previous production containers (if any)
run: docker compose -f $COMPOSE_FILE down || true

- name: Set up test containers
run: docker compose -f docker-compose.stag.yml up --build -d

Expand All @@ -38,5 +35,17 @@ jobs:
- name: Tear down test containers
run: docker compose -f docker-compose.stag.yml down

- name: Tear down previous production containers (if any)
run: docker compose -f $COMPOSE_FILE down || true

- name: Build and run docker image
run: docker compose -f $COMPOSE_FILE up --_
run: docker compose -f $COMPOSE_FILE up --force-recreate --build -d

- name: Print deployment message
run: |
echo "Code has been updated and deployed to the server!"
echo "Commit hash: ${{ github.sha }}"
echo "Branch: ${{ github.ref }}"
- name: Verify that gateway is available
run: docker ps

0 comments on commit 242e5cc

Please sign in to comment.