diff --git a/.github/workflows/opentrons-ai-production-deploy.yaml b/.github/workflows/opentrons-ai-production-deploy.yaml index 85e8fda5662..825c3561f25 100644 --- a/.github/workflows/opentrons-ai-production-deploy.yaml +++ b/.github/workflows/opentrons-ai-production-deploy.yaml @@ -53,7 +53,7 @@ jobs: make setup-js - name: 'build' run: | - make -C opentrons-ai-client build + make -C opentrons-ai-client build-production - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: diff --git a/opentrons-ai-client/Makefile b/opentrons-ai-client/Makefile index 74be2388b78..2ba3671882e 100644 --- a/opentrons-ai-client/Makefile +++ b/opentrons-ai-client/Makefile @@ -17,11 +17,14 @@ tests ?= cov_opts ?= --coverage=true test_opts ?= +# This variable is for all command +target ?= production + # standard targets ##################################################################### .PHONY: all -all: clean build +all: clean build-$(target) .PHONY: setup setup: @@ -34,16 +37,15 @@ clean: # artifacts ##################################################################### -.PHONY: build -build: export NODE_ENV := production -build: +.PHONY: build-production +build-production: export NODE_ENV := production +build-production: vite build git rev-parse HEAD > dist/.commit - .PHONY: build-staging -build: export NODE_ENV := staging -build: +build-staging: export NODE_ENV := staging +build-staging: vite build git rev-parse HEAD > dist/.commit @@ -75,4 +77,4 @@ staging-deploy: .PHONY: prod-deploy prod-deploy: - aws s3 sync ./dist s3://prod-opentrons-ai-front-end/ --delete \ No newline at end of file + aws s3 sync ./dist s3://prod-opentrons-ai-front-end/ --delete