Skip to content

remove knowledge_base.json from source control #62

remove knowledge_base.json from source control

remove knowledge_base.json from source control #62

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deploy-production:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
environment: production
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Checkout Repo
uses: actions/checkout@v4
- name: Configure AWS Credentials for CI
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::488659951590:role/ci-role-d4fe904 # ciRoleArn from defang-io/infrastructure stack
- name: Configure AWS Credentials for Corp Website Account
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-chaining: true
role-duration-seconds: 1200
role-to-assume: arn:aws:iam::407839483216:role/admin
- name: Set up cache for pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('app/requirements.txt') }}
- name: Install Python dependencies
working-directory: ./app
run: pip install -r requirements.txt
- name: Update knowledge_base.json
working-directory: ./app
run: python3 get_knowledge_base.py
- name: Deploy
uses: DefangLabs/defang-github-action@v1.1.3
with:
config-env-vars: ASK_TOKEN OPENAI_API_KEY REBUILD_TOKEN SECRET_KEY SEGMENT_WRITE_KEY DISCORD_APP_ID DISCORD_TOKEN DISCORD_PUBLIC_KEY
mode: production
provider: aws
env:
ASK_TOKEN: ${{ secrets.ASK_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
REBUILD_TOKEN: ${{ secrets.REBUILD_TOKEN }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
DISCORD_APP_ID: ${{ secrets.DISCORD_APP_ID }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISCORD_PUBLIC_KEY: ${{ secrets.DISCORD_PUBLIC_KEY }}