Merge pull request #106 from UMLCloudComputing/create_embedding #111
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '22' | |
- name: Install dependencies | |
run: | | |
npm install -g aws-cdk | |
pip install -r requirements.txt | |
- name: Bootstrap | |
run: cdk bootstrap | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
APP_NAME: ${{vars.APP_NAME}} | |
PINECONE_INDEX_NAME: ${{vars.PINECONE_INDEX_NAME}} | |
PINECONE_API_KEY: ${{secrets.PINECONE_API_KEY}} | |
DISCORD_ID: ${{vars.DISCORD_ID}} | |
DISCORD_PUBLIC_KEY: ${{ secrets.DISCORD_PUBLIC_KEY }} | |
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}} | |
- 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 }} | |
APP_NAME: ${{vars.APP_NAME}} | |
PINECONE_INDEX_NAME: ${{vars.PINECONE_INDEX_NAME}} | |
PINECONE_API_KEY: ${{secrets.PINECONE_API_KEY}} | |
DISCORD_ID: ${{vars.DISCORD_ID}} | |
DISCORD_PUBLIC_KEY: ${{ secrets.DISCORD_PUBLIC_KEY }} | |
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}} | |
- name: Register & Delete Commands | |
run: cd commands && python3 register_commands.py | |
env: | |
DISCORD_ID: ${{vars.DISCORD_ID}} | |
DISCORD_PUBLIC_KEY: ${{ secrets.DISCORD_PUBLIC_KEY }} | |
DISCORD_TOKEN: ${{secrets.DISCORD_TOKEN}} |