Merge pull request #8 from alongotv/feature/delete_audio_command_mess… #62
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: 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 |