Skip to content

test deployment automation #1

test deployment automation

test deployment automation #1

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up SSH
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.EC2_SSH_KEY }}
- name: Deploy to EC2
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} << 'EOF'
cd algorithmic-contest-platform
sudo docker-compose down
sudo git pull origin main
pnpm install --production
pnpm run build
docker-compose up --build -d
pnpm run start:web
EOF