File tree Expand file tree Collapse file tree 3 files changed +51
-14
lines changed Expand file tree Collapse file tree 3 files changed +51
-14
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Frontend
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - run : docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
13
+ - run : docker build -t cygnetops/react-test -f Dockerfile.dev .
14
+ - run : docker run -e CI=true cygnetops/react-test npm test
15
+
16
+ - name : Generate deployment package
17
+ run : zip -r deploy.zip . -x '*.git*'
18
+
19
+ - name : Deploy to EB
20
+ uses : einaregilsson/beanstalk-deploy@v18
21
+ with :
22
+ aws_access_key : ${{ secrets.AWS_ACCESS_KEY }}
23
+ aws_secret_key : ${{ secrets.AWS_SECRET_KEY }}
24
+ application_name : docker-gh
25
+ environment_name : Dockergh-env
26
+ existing_bucket_name : elasticbeanstalk-ap-southeast-1-144364321687
27
+ region : ap-southeast-1
28
+ version_label : ${{ github.sha }}
29
+ deployment_package : deploy.zip
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+ services :
3
+ web :
4
+ build :
5
+ context : .
6
+ dockerfile : Dockerfile.dev
7
+ ports :
8
+ - ' 3000:3000'
9
+ volumes :
10
+ - /app/node_modules
11
+ - .:/app
12
+ tests :
13
+ build :
14
+ context : .
15
+ dockerfile : Dockerfile.dev
16
+ volumes :
17
+ - /app/node_modules
18
+ - .:/app
19
+ command : ['npm','run','test']
Original file line number Diff line number Diff line change 1
1
version : ' 3'
2
2
services :
3
3
web :
4
- build :
5
- context : .
6
- dockerfile : Dockerfile.dev
7
- ports :
8
- - ' 3000:3000'
9
- volumes :
10
- - /app/node_modules
11
- - .:/app
12
- tests :
13
4
build :
14
5
context : .
15
- dockerfile : Dockerfile.dev
16
- volumes :
17
- - /app/node_modules
18
- - .:/app
19
- command : ['npm','run','test']
6
+ dockerfile : Dockerfile
7
+ ports :
8
+ - ' 80:80'
You can’t perform that action at this time.
0 commit comments