Skip to content

Commit

Permalink
feat: restructure CI workflow to include deployment steps
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonardoMeireles55 committed Jan 17, 2025
1 parent 8045f8b commit 1ff8784
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/docker-image-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ jobs:
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
- name: Build and push Docker image
run: |
docker-compose -f docker-compose.build.yml build
docker-compose -f docker-compose.build.yml push
- name: Deploy to server
# run: |
# docker-compose -f docker-compose.build.yml build
# docker-compose -f docker-compose.build.yml push

deploy:
runs-on: [self-hosted, linux, x64, frontend]
needs: build

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy
run: |
docker-compose pull
docker-compose up -d

0 comments on commit 1ff8784

Please sign in to comment.