add workflows
This commit is contained in:
19
.github/workflows/deploy.yaml
vendored
Normal file
19
.github/workflows/deploy.yaml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["canary"]
|
||||
workflow_dispatch:
|
||||
|
||||
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 "DATABASE_URL=${{ secrets.DATABASE_URL }}" --restart always --name ${{ github.event.repository.name }} ${{ github.repository }}
|
||||
Reference in New Issue
Block a user