Skip to content

Commit bedb526

Browse files
migrate to cf
1 parent f5c4625 commit bedb526

14 files changed

+8741
-160
lines changed

.github/workflows/ci.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
name: CI
7+
8+
jobs:
9+
release:
10+
if: github.ref == 'refs/heads/main'
11+
runs-on: ubuntu-latest
12+
needs: [test, lint]
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: 18
18+
- run: npm install
19+
- run: npm run publish
20+
env:
21+
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
22+
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}

.github/workflows/release.yml

-28
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
node_modules
44
yarn-error.log
55
yarn.lock
6+
.dev.vars

README.MD

+27-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
# Discord Bot
22

3+
## Register commands
4+
5+
The following command only needs to be run once:
6+
7+
```
8+
$ npm run register
9+
```
10+
11+
## Run app
12+
13+
Now you should be ready to start your server:
14+
15+
```bash
16+
$ npm run dev
17+
```
18+
19+
## Setup app
20+
21+
![interactions-endpoint](https://user-images.githubusercontent.com/534619/157510959-6cf0327a-052a-432c-855b-c662824f15ce.png)
22+
23+
### Storing secrets
24+
25+
The credentials in `.dev.vars` are only applied locally. The production service needs access to credentials from your app:
26+
327
```bash
4-
yarn
5-
node index.js
28+
$ wrangler secret put DISCORD_TOKEN
29+
$ wrangler secret put DISCORD_PUBLIC_KEY
30+
$ wrangler secret put DISCORD_APPLICATION_ID
631
```

deploy-commands.js

-20
This file was deleted.

docker/Dockerfile

-5
This file was deleted.

index.js

-97
This file was deleted.

0 commit comments

Comments
 (0)