Skip to content

Commit

Permalink
chore: add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-deliveroo committed Nov 3, 2024
1 parent b3db705 commit b068cea
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy MultiDocker
on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- run: docker build -t rishikant42/react-test -f ./client/Dockerfile.dev ./client
- run: docker run -e CI=true rishikant42/react-test npm test

- run: docker build -t rishikant42/multi-client ./client
- run: docker build -t rishikant42/multi-nginx ./nginx
- run: docker build -t rishikant42/multi-server ./server
- run: docker build -t rishikant42/multi-worker ./worker

- run: docker push rishikant42/multi-client
- run: docker push rishikant42/multi-nginx
- run: docker push rishikant42/multi-server
- run: docker push rishikant42/multi-worker

- name: Generate deployment package
run: zip -r deploy.zip . -x '*.git*'

- 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: Multi-docker-env
existing_bucket_name: elasticbeanstalk-eu-west-1-337909764067
region: us-east-1
version_label: ${{ github.sha }}
deployment_package: deploy.zip

0 comments on commit b068cea

Please sign in to comment.