-
Notifications
You must be signed in to change notification settings - Fork 13
58 lines (47 loc) · 1.9 KB
/
deploy.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy bot
on:
workflow_dispatch:
release:
types: [published]
jobs:
run:
name: Deploy bot
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- name: Setup Node.JS
uses: actions/[email protected]
with:
node-version: 20.6.0
cache: npm
- name: Download bad words
run:
curl "https://gist.githubusercontent.com/${{ secrets.PRIVATE_GIST
}}/raw/automod_bad-words.ts" --output modules/automod/bad-words.ts
- name: Download autos data
run:
curl "https://gist.githubusercontent.com/${{ secrets.PRIVATE_GIST
}}/raw/autos_autos-data.ts" --output modules/autos/autos-data.ts
- name: Download dad
run:
curl "https://gist.githubusercontent.com/${{ secrets.PRIVATE_GIST
}}/raw/autos_dad.ts" --output modules/autos/dad.ts
- name: Download strings
run:
curl "https://gist.githubusercontent.com/${{ secrets.PRIVATE_GIST
}}/raw/strings.ts" --output common/strings.ts
- name: Checkout images
run: git clone https://gist.github.com/${{ secrets.IMAGES_GIST }}.git .private/images
- name: Install
run: npm ci --force
- name: Deploy
run:
npx railway up --detach --service afdb8def-13c6-4650-af4e-ef60d2009b56
--environment production
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
- name: Clean DB listeners
run: curl https://sa-discord.up.railway.app/prepare-exit?auth=${{ secrets.EXIT_AUTH }}