diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index ccce6870..dfc1d975 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -18,6 +18,7 @@ jobs: S3_ACCESS_KEY: ${{ secrets.PROD_S3_ACCESS_KEY }} S3_SECRET_ACCESS_KEY: ${{ secrets.PROD_S3_SECRET_ACCESS_KEY }} S3_BUCKET_NAME: ${{ secrets.PROD_S3_BUCKET_NAME }} + S3_DIRECTORY_NAME: ${{ secrets.PROD_S3_DIRECTORY_NAME }} CORS_ORIGIN_NAME: ${{ secrets.PROD_CORS_ORIGIN_NAME }} steps: @@ -31,7 +32,13 @@ jobs: distribution: 'adopt' - name: Build with Gradle - run: ./gradlew clean build + run: ./gradlew clean build -Dspring.profiles.active=test + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Build Docker image uses: docker/build-push-action@v2 @@ -40,8 +47,6 @@ jobs: push: true tags: recordit/record-it:latest file: ./dockerfile - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} deploy: needs: build