Skip to content

Merge pull request #22 from codeforberlin/allow-searching-by-name #22

Merge pull request #22 from codeforberlin/allow-searching-by-name

Merge pull request #22 from codeforberlin/allow-searching-by-name #22

Workflow file for this run

name: Deploy latest version
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Publish to Registry
uses: elgohr/[email protected]
with:
name: knuthuehne/jedeschule-api
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
deploy:
needs: build
runs-on: ubuntu-latest
environment: production
steps:
- name: Pull latest docker images and restart
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd /home/jedeschule/
sudo docker-compose pull web
sudo docker-compose up --detach --build web
sudo docker image prune -f