Skip to content

fix: correct absolute path to deploy.sh #11

fix: correct absolute path to deploy.sh

fix: correct absolute path to deploy.sh #11

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create SSH Key file
run: |
echo "${{ secrets.EC2_KEY }}" > key.pem
chmod 400 key.pem
- name: SSH into EC2 and deploy with Docker Compose
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_KEY }}
script: |
cd /home/ubuntu/url-shortener/app
chmod +x deploy.sh
./deploy.sh