File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed
Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change 88 runs-on : ubuntu-latest
99
1010 steps :
11+ - name : Checkout code
12+ uses : actions/checkout@v4
13+
14+ - name : Read Node version
15+ run : |
16+ NODE_VERSION=$(cat .nvmrc | sed 's/v//')
17+ echo "NODE_VERSION=$NODE_VERSION" >> $GITHUB_ENV
18+
1119 - name : Deploy Discord Commands to VPS
12201321 with :
@@ -16,14 +24,14 @@ jobs:
1624 key : ${{ secrets.VPS_SSH_KEY }}
1725 script : |
1826 cd /home/${{ secrets.VPS_USER }}/webdev-bot-deploy
19-
20- # Load environment variables
21- source .env
22- source .env.production
23- export NODE_ENV=production
24-
25- # Run the deploy script
27+
28+ # Read NODE_VERSION from .nvmrc
29+ export NODE_VERSION=$(cat .nvmrc | sed 's/v//')
30+ echo "Using Node version: $NODE_VERSION"
31+
32+ # Run deploy script inside the already running Docker container
33+ # .env file should already exist from main deployment
2634 echo "Deploying Discord commands..."
27- node dist/util/deploy.js
28-
35+ docker compose --profile prod exec bot-prod node dist/util/deploy.js
36+
2937 echo "Discord commands deployment completed!"
You can’t perform that action at this time.
0 commit comments