Skip to content

Commit

Permalink
🚚 cd: add deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnPetros committed Jun 17, 2024
1 parent 8f42ffe commit cae19c0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Continous Delivery

on:
push:
branches:
- main

jobs:
CD:
runs_on: ubuntu-latest

steps:
- name: Checkout app
uses: actions/checkout@v4

- name: Deploy app
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_KEY }}
source: "."
target: "/smart-farming"

- name: Run app
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_KEY }}
script: |
cd /smart-farming
docker compose up -d

0 comments on commit cae19c0

Please sign in to comment.