-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.26 KB
/
main.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
name: AWS CDK Bootstrap and Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: |
npm install -g aws-cdk
pip install -r requirements.txt
- name: Bootstrap
run: cdk bootstrap
env:
APP_NAME: ${{secrets.APP_NAME}}
DISCORD_PUBLIC_KEY: ${{ secrets.DISCORD_PUBLIC_KEY }}
ID: ${{secrets.ID}}
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
- name: Deploy
run: cdk deploy --all --require-approval never
env:
APP_NAME: ${{secrets.APP_NAME}}
DISCORD_PUBLIC_KEY: ${{ secrets.DISCORD_PUBLIC_KEY }}
ID: ${{secrets.ID}}
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
- name: Register & Delete Commands
run: cd commands && python3 register_commands.py
env:
DISCORD_PUBLIC_KEY: ${{ secrets.DISCORD_PUBLIC_KEY }}
ID: ${{secrets.ID}}
TOKEN: ${{secrets.TOKEN}}