style: update UI styling for chat interface #12
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| cache-dependency-path: docker_image/requirements.txt | |
| - name: Install dependencies | |
| run: | | |
| pip install -r docker_image/requirements.txt | |
| pip install pytest httpx | |
| - name: Run tests | |
| run: PYTHONPATH=docker_image/src pytest tests/ -v | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -t rag-app docker_image/ | |
| deploy: | |
| needs: [test, docker-build] | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| 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: Login to Amazon ECR | |
| id: login-ecr | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| - name: Build and push Docker image | |
| run: | | |
| docker build \ | |
| --build-arg AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \ | |
| --build-arg AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \ | |
| -t rag-app docker_image/ | |
| docker tag rag-app:latest ${{ secrets.ECR_REPOSITORY_URI }}:latest | |
| docker push ${{ secrets.ECR_REPOSITORY_URI }}:latest | |
| - name: Update Lambda function | |
| run: | | |
| aws lambda update-function-code \ | |
| --function-name ${{ secrets.LAMBDA_FUNCTION_NAME }} \ | |
| --image-uri ${{ secrets.ECR_REPOSITORY_URI }}:latest | |
| aws lambda wait function-updated-v2 \ | |
| --function-name ${{ secrets.LAMBDA_FUNCTION_NAME }} | |
| echo "Lambda function updated successfully." |