install deps before updating kb #60
This file contains hidden or 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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-production: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
environment: production | |
steps: | |
- 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: Update knowledge_base.json | |
working-directory: ./app | |
run: | | |
pip install -r requirements.txt | |
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 }} |