diff --git a/.github/workflows/deploy-oca.yml b/.github/workflows/deploy-oca.yml index dea9936..aa89634 100644 --- a/.github/workflows/deploy-oca.yml +++ b/.github/workflows/deploy-oca.yml @@ -2,15 +2,15 @@ name: CI/CD OCA on: push: - tags: ["*"] + branch: "teste-deploy-aws" jobs: build: - runs-on: oca-self-hosted-runner + runs-on: ["x1-aws-self-hosted-runner", "x2-aws-self-hosted-runner"] steps: - uses: actions/checkout@v4 - - name: Update docker metadata with the tag + - name: Update docker metadata with the tag uses: docker/metadata-action@v4 id: meta with: @@ -47,11 +47,11 @@ jobs: NEXT_PUBLIC_MAIL_APP_PASS=${{ secrets.NEXT_PUBLIC_MAIL_APP_PASS }} - name: Pull the latest image - run: sudo docker pull ${{ vars.DOCKER_IMAGE_PROD }}:latest - + run: sudo docker pull ${{ vars.DOCKER_IMAGE_PROD }}:latest + - name: Stop existing container - run: sudo docker rm -f ${{ vars.CONTAINER_NAME_PROD }} || true - + run: sudo docker rm -f ${{ vars.CONTAINER_NAME_PROD }} || true + - name: Run new container run: sudo docker run --name ${{ vars.CONTAINER_NAME_PROD }} -p ${{ vars.HOST_PORT_PROD }}:${{ vars.CONTAINER_PORT }} -d ${{ vars.DOCKER_IMAGE_PROD }}:latest