Skip to content

update the docker exec command #22

update the docker exec command

update the docker exec command #22

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Test
uses: appleboy/ssh-action@master
with:
host: ${{secrets.SERVER_IP}}
username: ${{secrets.SERVER_USERNAME}}
key: ${{secrets.SSH_PRIVATE_KEY}}
script_stop: true
command_timeout: 200m
script: |
cd /home/apps/workflow-app
git pull
docker-compose up -d
docker exec backend npm run test
docker-compose down
deploy:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v1
- name: Deploy to Production
uses: appleboy/ssh-action@master
with:
host: ${{secrets.SERVER_IP}}
username: ${{secrets.SERVER_USERNAME}}
key: ${{secrets.SSH_PRIVATE_KEY}}
script_stop: true
command_timeout: 200m
script: |
cd /home/apps/workflow-app
git pull
docker-compose -f docker-compose-prod.yaml up -d --build