Skip to content

Add coloring to console #19

Add coloring to console

Add coloring to console #19

Workflow file for this run

name: Deployment
on:
push:
branches: [ "release" ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
working-directory: .
run: docker build . -t ${{ secrets.DOCKERHUB_USERNAME }}/huisbot:latest
- name: Log into Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push the image to Docker Hub
run: docker push minisbett/huisbot
- name: Deploy the image on production server
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
script: |
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/huisbot:latest
docker stop huisbot
docker rm huisbot
docker run -d --env-file "/root/huisbot/.env" --name huisbot ${{ secrets.DOCKERHUB_USERNAME }}/huisbot:latest