Skip to content

Add CORS configuration for multiple origins #7

Add CORS configuration for multiple origins

Add CORS configuration for multiple origins #7

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- main # Set this to the branch you want to deploy from
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Copy repository to EC2
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
port: 22
source: "."
target: "~/Shuno-Backend"
- name: Executing remote SSH commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
port: 22
script: |
cd ~/Shuno-Backend
docker build -t shuno_backend .
docker stop shuno_backend || true
docker run -d --name shuno_backend -p 5000:5000 shuno_backend
docker system prune -a --volumes -f