Fix : vad_ex import error #10
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: Model Serving | |
on: | |
pull_request: | |
branches: ['develop'] # develop 브랜치에 pull request될 때 동작 | |
push: | |
branches: ['develop'] # develop 브랜치에 push될 때 동작 | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{secrets.DOCKERHUB_USERNAME}} | |
password: ${{secrets.DOCKERHUB_PASSWORD}} | |
- name: Build docker file and setting deploy files | |
run: | | |
docker build -t makezenerator/serving:latest serving/ | |
docker push makezenerator/serving:latest | |
cd: | |
runs-on: ubuntu-latest | |
needs: [ci] | |
steps: | |
- name: Connect to server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{secrets.SERVER3_HOST}} | |
username: ${{secrets.SERVER_USERNAME}} | |
key: ${{secrets.SERVER3_KEY}} | |
port: ${{secrets.SERVER_PORT}} | |
script: | | |
docker login -u "${{secrets.DOCKERHUB_USERNAME}}" -p "${{secrets.DOCKERHUB_PASSWORD}}" | |
docker stop $(docker ps -a -q) | |
docker rm -f $(docker ps -a -q) | |
docker pull makezenerator/serving:latest | |
docker run -d -p 5050:5050 makezenerator/serving:latest | |
docker image prune -f |