Skip to content

Commit a9eec7c

Browse files
committed
🤖 ci: add GitHub Actions workflow for deploying Discord commands to VPS
1 parent 96ff69c commit a9eec7c

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy Discord Commands
2+
3+
on:
4+
workflow_dispatch: # Manual trigger only
5+
6+
jobs:
7+
deploy-commands:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Deploy Discord Commands to VPS
12+
uses: appleboy/ssh-action@v1.0.3
13+
with:
14+
host: ${{ secrets.VPS_HOST }}
15+
username: ${{ secrets.VPS_USER }}
16+
key: ${{ secrets.VPS_SSH_KEY }}
17+
script: |
18+
cd /home/${{ secrets.VPS_USER }}/webdev-bot-deploy
19+
20+
# Set up environment variables for the deploy script
21+
export DISCORD_TOKEN="${{ secrets.DISCORD_TOKEN }}"
22+
export CLIENT_ID="${{ secrets.CLIENT_ID }}"
23+
export NODE_ENV=production
24+
25+
# Run the deploy script
26+
echo "Deploying Discord commands..."
27+
node dist/util/deploy.js
28+
29+
echo "Discord commands deployment completed!"

0 commit comments

Comments
 (0)