Skip to content

Commit 9bbc2cf

Browse files
committed
ci: update deployment workflow to include .env.local file creation with secrets for Discord bot
1 parent 471ef2b commit 9bbc2cf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
name: Build, Test and Deploy Discord Bot to VPS but shorter
1+
name: Build, Test and Deploy Discord Bot to VPS
22

33
on:
4+
push:
5+
branches: [ "main" ]
46
workflow_dispatch: # Allow manual deployment
57

68
jobs:
@@ -27,6 +29,13 @@ jobs:
2729
git checkout main
2830
git pull origin main
2931
32+
# Create .env.local file with secrets
33+
cat > .env.local << EOF
34+
DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }}
35+
CLIENT_ID=${{ secrets.CLIENT_ID }}
36+
NODE_VERSION=$(cat .nvmrc | tr -d 'v')
37+
EOF
38+
3039
# Stop any existing containers
3140
docker-compose down || true
3241

0 commit comments

Comments
 (0)