🚚 cd: add deploy workflow #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continous Delivery | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
CD: | ||
runs_on: ubuntu-latest | ||
Check failure on line 10 in .github/workflows/cd.yaml GitHub Actions / Continous DeliveryInvalid workflow file
|
||
steps: | ||
- name: Checkout app | ||
uses: actions/checkout@v4 | ||
- name: Deploy app | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SERVER_HOST }} | ||
username: ${{ secrets.SERVER_USERNAME }} | ||
key: ${{ secrets.SERVER_KEY }} | ||
source: "." | ||
target: "/smart-farming" | ||
- name: Run app | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SERVER_HOST }} | ||
username: ${{ secrets.SERVER_USERNAME }} | ||
key: ${{ secrets.SERVER_KEY }} | ||
script: | | ||
cd /smart-farming | ||
docker compose up -d | ||