deploy.yml
1name: Deploy
2
3on:
4 push:
5 branches: [ main ]
6 tags:
7 - 'v*'
8
9jobs:
10 deploy:
11 runs-on: ubuntu-latest
12
13 steps:
14 - uses: actions/checkout@v3
15
16 - name: Use Node.js
17 uses: actions/setup-node@v3
18 with:
19 node-version: '20.x'
20
21 - name: Install dependencies
22 run: |
23 npm i
24 npm ci
25
26 - name: Build
27 run: npm run build
28
29 - name: Deploy Discord Commands
30 if: startsWith(github.ref, 'refs/tags/')
31 env:
32 DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
33 DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
34 DISCORD_GUILD_ID: ${{ secrets.DISCORD_GUILD_ID }}
35 run: npm run deploy-commands