Skip to content

Merge pull request #41 from kevinkoech357/dependabot/pip/gunicorn-22.0.0 #19

Merge pull request #41 from kevinkoech357/dependabot/pip/gunicorn-22.0.0

Merge pull request #41 from kevinkoech357/dependabot/pip/gunicorn-22.0.0 #19

Workflow file for this run

name: Docker Build and Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build_and_deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: SSH into Server, Pull Changes, and Build Docker Image
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd ${{ secrets.WORK_DIR }}
git pull origin main
docker build -t kemistry .
docker tag kemistry:latest kevinkoech357/kemistry:latest
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker push kevinkoech357/kemistry:latest
- name: Cleanup
run: rm -f ~/.ssh/id_rsa ~/.ssh/known_hosts