Skip to content

Deploy to EC2

Deploy to EC2 #3

Workflow file for this run

#
name: Deploy to EC2
on: workflow_dispatch
jobs:
deployment:
runs-on: ubuntu-latest
environment: production
steps:
- name: Deploy to EC2
uses: fifsky/ssh-action@master
with:
host: ${{ secrets.IP_ADDRESS }}
user: ${{ secrets.USER_NAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
command: |
cd /var/www
cat personal_access_token | docker login ghcr.io -u mhsiungw --password-stdin
sudo docker-compose up --build -d