Skip to content

Commit 84b00e1

Browse files
authored
moved ci/cd logic to one file
1 parent 66b0e79 commit 84b00e1

File tree

2 files changed

+43
-16
lines changed

2 files changed

+43
-16
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/workflow.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Build the Docker image
12+
run: docker build -t mcappy/docker-react -f Dockerfile.dev .
13+
14+
test:
15+
runs-on: ubuntu-latest
16+
needs: build
17+
steps:
18+
- name: Run the test cases
19+
run: docker run -e CI=true mcappy/docker-react yarn test
20+
21+
deploy:
22+
runs-on: ubuntu-latest
23+
needs: [build, test]
24+
steps:
25+
26+
- name: Checkout source code
27+
uses: actions/checkout@v2
28+
29+
- name: Generate deployment package
30+
run: zip -r deploy.zip . -x '*.git*'
31+
32+
- name: Deploy to EB
33+
uses: einaregilsson/beanstalk-deploy@v18
34+
with:
35+
aws_access_key: ${{ secrets.ACCESS_KEY_ID }}
36+
aws_secret_key: ${{ secrets.SECRET_ACCESS_KEY }}
37+
application_name: docker
38+
environment_name: Docker-env-1
39+
version_label: ver-${{ github.sha }}
40+
region: us-east-2
41+
deployment_package: deploy.zip
42+
43+

0 commit comments

Comments
 (0)