Skip to content

fix deploy.yml

fix deploy.yml #2

Workflow file for this run

name: Test and Deploy
on:
push:
branches:
- feature/cicd
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Send
uses: appleboy/scp-action@master
with:
host: ${{ secrets.TEST_HOST }}
username: ${{ secrets.TEST_USERNAME }}
key: ${{ secrets.TEST_SSH_KEY }}
port: ${{ secrets.TEST_PORT }}
source: "."
target: ${{ secrets.TEST_DIR }}
- name: Test
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.TEST_HOST }}
username: ${{ secrets.TEST_USERNAME }}
key: ${{ secrets.TEST_SSH_KEY }}
port: ${{ secrets.TEST_PORT }}
script: |
cd ${{ secrets.TEST_DIR }}
make test-app
deploy:
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Send
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
source: "."
target: ${{ secrets.DIR }}
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
script: |
cd ${{ secrets.DIR }}
make build-app