Skip to content

Commit

Permalink
[CI/CD] Add restart step
Browse files Browse the repository at this point in the history
  • Loading branch information
SyzSteM committed Jan 23, 2024
1 parent 4b08763 commit 6c54ef7
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
run: npm install
working-directory: FE_Fitness_Tracker

# - name: Run Tests
# run: npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
# working-directory: FE_Fitness_Tracker
# - name: Run Tests
# run: npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
# working-directory: FE_Fitness_Tracker

- name: Build
run: npm run build:prod
Expand Down Expand Up @@ -107,3 +107,17 @@ jobs:

- name: Push image to DigitalOcean Container Registry
run: docker push $DOCKER_IMAGE_TAG

restart-application:
needs: build-and-push-docker
runs-on: ubuntu-latest
steps:
- name: SSH and Restart Service
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DROPLET_IP_ADDRESS }}
username: root
key: ${{ secrets.DROPLET_SSH_KEY }}
script: |
docker compose -f docker-compose.prod.yaml down
docker compose -f docker-compose.prod.yaml up --pull always --detach

0 comments on commit 6c54ef7

Please sign in to comment.