-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (53 loc) · 1.83 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
50
51
52
53
54
55
56
57
58
59
60
61
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: Configure AWS Creds
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: us-east-1
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: |
npm install
npm install -g aws-cdk
- name: Bootstrap
run: cdk bootstrap
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
DISCORD_PUBLIC_KEY: ${{ secrets.DISCORD_PUBLIC_KEY }}
LAMBDA_FUNC: ${{secrets.LAMBDA_FUNC}}
BEDROCK_ID: ${{secrets.BEDROCK_ID}}
BEDROCK_KEY: ${{secrets.BEDROCK_KEY}}
S3_ID: ${{secrets.S3_ID}}
S3_KEY: ${{secrets.S3_KEY}}
KNOWLEDGE_BASE_ID: ${{secrets.KNOWLEDGE_BASE_ID}}
ID: ${{secrets.ID}}
- name: Deploy
run: cdk deploy --all --require-approval never
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
DISCORD_PUBLIC_KEY: ${{ secrets.DISCORD_PUBLIC_KEY }}
LAMBDA_FUNC: ${{secrets.LAMBDA_FUNC}}
BEDROCK_ID: ${{secrets.BEDROCK_ID}}
BEDROCK_KEY: ${{secrets.BEDROCK_KEY}}
S3_ID: ${{secrets.S3_ID}}
S3_KEY: ${{secrets.S3_KEY}}
KNOWLEDGE_BASE_ID: ${{secrets.KNOWLEDGE_BASE_ID}}
ID: ${{secrets.ID}}