This repository has been archived on 2026-03-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
bot/.github/workflows/deploy.yaml
2022-07-02 17:10:49 +02:00

21 lines
691 B
YAML

name: Deploy
on:
push:
branches: ["canary"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Build image
run: docker build -t ${{ github.repository }} .
- name: Deploy image
run: |
docker stop ${{ github.event.repository.name }} || true
docker rm ${{ github.event.repository.name }} || true
docker run -d -e "DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }}" -e "REDIS_TOKEN=${{ secrets.REDIS_TOKEN }}" -e "DATABASE_URL=${{ secrets.DATABASE_URL }}" --restart always --network BOT --name ${{ github.event.repository.name }} ${{ github.repository }}