Skip to content

Merge pull request #27 from BattMoTeam/dev #1

Merge pull request #27 from BattMoTeam/dev

Merge pull request #27 from BattMoTeam/dev #1

Workflow file for this run

name: Docker Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Build Docker Image
run: docker build -t battmogui:latest .
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Copy Docker Image to VPS
uses: appleboy/scp-action@master
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USERNAME }}
password: ${{ secrets.VPS_PASSWORD }}
port: 22
source: "."
target: "/home/ubuntu/docker/battmogui"
- name: SSH into VPS and Load Docker Image
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USERNAME }}
password: ${{ secrets.VPS_PASSWORD }}
port: 22
script: |
docker load -i /home/ubuntu/docker/battmogui/battmogui.tar
docker run -d -p 8501:8501 -p 5000:5000 --name battmogui:latest