Skip to content

Merge pull request #32 from defisaver/feat/safe-support #10

Merge pull request #32 from defisaver/feat/safe-support

Merge pull request #32 from defisaver/feat/safe-support #10

name: Forkoor - Build and Deploy
on:
workflow_dispatch:
push:
branches: main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
DOCKER_COMPOSE_FILE: "compose.yaml"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Deploy Docker image on EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.USER_NAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/ubuntu/app/defisaver-forkooor &&
git checkout main &&
git fetch --all &&
git pull origin main &&
docker compose up --build -d