change deploy env #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy MultiDocker App | |
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-2 | |
existing_bucket_name: elasticbeanstalk-eu-west-1-337909764067 | |
region: eu-west-1 | |
version_label: ${{ github.sha }} | |
deployment_package: deploy.zip |