Skip to content

Merge pull request #4 from alongotv/feature/fix_deployment #58

Merge pull request #4 from alongotv/feature/fix_deployment

Merge pull request #4 from alongotv/feature/fix_deployment #58

Workflow file for this run

name: Stroggs Bot Deployment
on:
push:
branches:
- trunk
jobs:
build:
env:
USER_NAME: ${{ secrets.USER_NAME }}
HOST_NAME: ${{ secrets.HOST_NAME }}
STROGG_DISCORD_BOT_KEY: ${{ secrets.DISCORD_BOT_KEY }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout repository
- name: Add Docker Context
uses: arwynfr/actions-docker-context@v2
with:
docker_host: 'ssh://$USER_NAME@$HOST_NAME:22'
context_name: 'remote_server_context'
ssh_cert: ${{ secrets.SSH_PUBLIC_KEY }}
ssh_key: ${{ secrets.SSH_PKEY }}
use_context: true
- name: Stop current bot instance
run: docker compose stop
- name: Run container in a remote context
run: docker compose up -d --build