Skip to content

Remove the initiate situation action (#521) #231

Remove the initiate situation action (#521)

Remove the initiate situation action (#521) #231

name: Deploy backend
on:
push:
branches:
- main
paths:
- 'backend/**'
workflow_dispatch:
jobs:
deploy_backend:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: iamlogand
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Replace placeholder with Docker image tag
run: |
sed -i "s/\${TAG}/${{ github.run_number }}/g" backend/docker-compose.yml
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
with:
context: backend
push: true
tags: iamlogand/republic-of-rome-online-backend:rorsite-build-${{ github.run_number }}
- name: Zip the application files
run: |
cd backend
zip -r ../app.zip .
- name: Deploy to Elastic Beanstalk
uses: einaregilsson/beanstalk-deploy@v20
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: republic-of-rome-online-backend
environment_name: republic-of-rome-online-backend-env
version_label: rorsite-build-${{ github.run_number }}
region: eu-west-2
deployment_package: app.zip