Skip to content

Main into Dev

Main into Dev #18

Workflow file for this run

name: Deploy API
on:
pull_request:
types:
- closed
branches: [main, development]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
working-directory: backend
run: |
python -m pip install -r requirements.txt
# - name: Update config.json
# working-directory: backend
# run: |
# echo ${{ secrets.CHALICE_CONFIG_JSON }} > .chalice/config.json
- name: Set up AWS CLI
working-directory: backend
run: |
pip install awscli
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set default.region ${{ secrets.AWS_REGION }}
- name: Deploy Chalice App
working-directory: backend
run: |
if [ ${{ github.base_ref }} == 'main' ]; then
chalice deploy --stage prod
elif [ ${{ github.base_ref }} == 'development' ]; then
chalice deploy --stage dev
else
echo "No deployment for this branch"
exit 0
fi