-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (25 loc) · 858 Bytes
/
deploy.yml
File metadata and controls
30 lines (25 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Deploy Copilot Bot to Raspberry Pi 5 with Docker
on:
workflow_dispatch:
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t copilot-bot-image:latest .
- name: Stop old Docker container
run: |
docker stop copilot-bot || true
docker rm copilot-bot || true
# Add the saved counting.json file as a volume to persist stored data
- name: Run new Docker container
run: |
docker run -d --name copilot-bot \
--restart unless-stopped \
-v /home/firesteel/Bots/Copilot/counting.json:/app/counting.json \
-e TOKEN=${{ secrets.TOKEN }} \
-e GUILD_ID=${{ vars.GUILD_ID }} \
copilot-bot-image:latest