-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.6 KB
/
deploy.yaml
File metadata and controls
43 lines (40 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy Frontend
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
# Run tests on dev container
- run: docker build -t cygnetops/react-test -f ./client/Dockerfile.dev ./client
- run: docker run -e CI=true cygnetops/react-test npm test
# Build images
- run: docker build -t k02d/multi-client ./client
- run: docker build -t k02d/multi-nginx ./nginx
- run: docker build -t k02d/multi-server ./server
- run: docker build -t k02d/multi-worker ./worker
# Push images to docker hub
- run: docker push k02d/multi-client
- run: docker push k02d/multi-nginx
- run: docker push k02d/multi-server
- run: docker push k02d/multi-worker
- name: Generate deployment package
run: zip -r deploy.zip . -x '*.git*'
# Copy Beanstalk Deploy action from https://github.com/marketplace/actions/beanstalk-deploy
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v18
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_key: ${{ secrets.AWS_SECRET_KEY }}
application_name: multi-docker
environment_name: Multidocker-env
# this bucket is in the S3 section on AWS
existing_bucket_name: elasticbeanstalk-us-east-2-704683640657
region: us-east-2
version_label: ${{ github.sha }}
deployment_package: deploy.zip
use_existing_version_if_available: true