Skip to content

Commit

Permalink
fix: multiple deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
izaiasmachado committed Mar 6, 2024
1 parent efbb6be commit 9889ed0
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
name: Deploy
on:
push:
# branches:
# - main
branches:
- main

jobs:
# push-to-registry:
# name: Push to DockerHub Registry
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
push-to-registry:
name: Push to DockerHub Registry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# - name: Set up JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: 17
# distribution: "zulu"
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: "zulu"

# - name: Login to DockerHub
# run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Login to DockerHub
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin

# - name: Build and push Docker image
# run: |
# docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/mandacarubroker-api .
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/mandacarubroker-api
- name: Build and push Docker image
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/mandacarubroker-api .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/mandacarubroker-api
deploy-test:
name: Deploy test environment to Azure VM
runs-on: ubuntu-latest
# needs: push-to-registry
needs: push-to-registry
environment:
name: azure-test
url: https://test-api.mandacarubroker.com.br/docs
Expand All @@ -51,7 +51,7 @@ jobs:
deploy-production:
name: Deploy production environment to Azure VM
runs-on: ubuntu-latest
# needs: push-to-registry
needs: push-to-registry
environment:
name: azure-production
url: https://api.mandacarubroker.com.br/docs
Expand Down

0 comments on commit 9889ed0

Please sign in to comment.