Skip to content

Commit b22451a

Browse files
committed
update steps for test and deployment
1 parent 74f5263 commit b22451a

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Deploy Frontend
33
on:
44
push:
55
branches: ['main']
6-
pull_request:
7-
branches: ['main']
86

97
jobs:
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

0 commit comments

Comments
 (0)