Skip to content

Commit

Permalink
Merge pull request #6 from whispernorbury/whispernorbury-patch-1
Browse files Browse the repository at this point in the history
Create main.yml
  • Loading branch information
whispernorbury authored Apr 4, 2024
2 parents 54074b0 + a69a1d2 commit 6129e8d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI/CD for Comkaraka REST API

on:
push:
branches:
- main

permissions: read-all

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: checkout repository
uses: actions/checkout@v3

- name: compose
uses: appleboy/ssh-action@master
with:
username: ${{ secrets.EC2_USER }}
host: ${{ secrets.EC2_HOST }}
key: ${{ secrets.EC2_SSH_PEM_KEY }}
script: |
cd comkaraka-back
sudo docker compose down
sudo docker rm $(sudo docker ps -aq)
sudo docker rmi $(sudo docker images -q)
git pull
sudo docker compose up --build -d

0 comments on commit 6129e8d

Please sign in to comment.