chore: update ci workflows for new server #40
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: docker build Thaliak.Service.Poller | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '.github/workflows/**' | |
- 'Thaliak.Common.Database/**' | |
- 'Thaliak.Service.Poller/**' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Thaliak.Service.Poller/Dockerfile | |
push: true | |
tags: ghcr.io/CrystallineTools/thaliak-poller:latest | |
- name: Deploy to production server | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.REMOTE_HOST }} | |
port: ${{ secrets.REMOTE_PORT }} | |
username: ${{ secrets.REMOTE_USER }} | |
key: ${{ secrets.REMOTE_SSH_KEY }} | |
script: ~/gha-deploy.sh poller |