Improve errors when removing player from group or competition (#239) #68
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: Build And Deploy Bot Image | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'docs/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
run: docker login -u ${{ secrets.ORG_DOCKER_USERNAME }} -p ${{ secrets.ORG_DOCKER_PASSWORD }} | |
- name: Build & Push the Docker image | |
run: | | |
docker build . --file Dockerfile.prod --tag wiseoldman/discord-bot:latest | |
docker push wiseoldman/discord-bot:latest | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Restart docker | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.DO_HOST }} | |
username: ${{ secrets.DO_USER }} | |
passphrase: ${{ secrets.DO_SSH_PASS }} | |
key: ${{ secrets.DO_SSH_KEY }} | |
script: | | |
cd wise-old-man | |
docker image rm wiseoldman/discord-bot | |
docker-compose pull bot | |
docker-compose up -d --no-deps --build bot |