File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ name: Deploy Frontend
33on :
44 push :
55 branches : ['main']
6- pull_request :
7- branches : ['main']
86
97jobs :
108 docker-test :
@@ -14,12 +12,23 @@ jobs:
1412 - name : Checkout code
1513 uses : actions/checkout@v4
1614
17- - name : Build Docker image for testing
15+ - name : Build Docker image for testing (using Dockerfile.dev)
1816 run : docker build -t cygnetops/react-test -f Dockerfile.dev .
1917
2018 - name : Run tests in Docker container
2119 run : docker run -e CI=true cygnetops/react-test npm test
2220
21+ deploy :
22+ runs-on : ubuntu-latest
23+ needs : docker-test # Ensures tests run before deploy
24+
25+ steps :
26+ - name : Checkout code
27+ uses : actions/checkout@v4
28+
29+ - name : Build Docker image for deployment (using Dockerfile)
30+ run : docker build -t cygnetops/react-prod -f Dockerfile .
31+
2332 - name : Generate deploy package (zip)
2433 run : zip -r deploy.zip . -x '*.git*'
2534
You can’t perform that action at this time.
0 commit comments