-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.75 KB
/
discord-bot-deployment.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
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: aws-actions/setup-sam@v1
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: NPM Clean Install
run: cd discord-bot && npm ci
- name: Deploy Serverless Bot on AWS
run: cd discord-bot && npm run deploy
env:
# Discord Bot Token, Guild ID and Client ID
TOKEN: ${{ secrets.TOKEN }}
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
GUILD_ID: ${{ secrets.GUILD_ID }}
# Faucet Contract Address and Minter Private Key
CONTRACT_ADDRESS: ${{ secrets.CONTRACT_ADDRESS }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
# Subspace EVM-Domain Token Symbol, RPC Endpoint and Blockscout Explorer URL
TOKEN_SYMBOL: ${{ secrets.TOKEN_SYMBOL }}
RPC_ENDPOINT: ${{ secrets.RPC_ENDPOINT }}
EXPLORER_URL: ${{ secrets.EXPLORER_URL }}
# Debug Mode (true/false)
DEBUG_MODE: ${{ secrets.DEBUG_MODE }}
# Slack integration
SLACK_ENABLED: ${{ secrets.SLACK_ENABLED }}
SLACK_BALANCE_NOTIFICATION_THRESHOLD: ${{ secrets.SLACK_BALANCE_NOTIFICATION_THRESHOLD }} # This amount * the withdraw amount is the threshold
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_CONVERSATION_ID: ${{ secrets.SLACK_CONVERSATION_ID }}
# FaunaDB integration
FAUNA_DB_SECRET: ${{ secrets.FAUNA_DB_SECRET }}