Merge pull request #31 from TermLens/feature/26-url-caching #15
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 Python Lambda to AWS (from src) | |
| on: | |
| push: | |
| branches: | |
| - test-deploy | |
| jobs: | |
| deploy_lambda: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| 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 | |
| run: | | |
| pip install -r requirements.txt -t ./src | |
| - name: Zip deployment package | |
| run: | | |
| cd src | |
| zip -r ../deployment-package.zip . | |
| - name: Configure AWS Credentials (OIDC) | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| aws-region: us-west-2 | |
| - name: Deploy to AWS Lambda | |
| run: | | |
| aws lambda update-function-code \ | |
| --function-name analyzeTermOfServicesTest \ | |
| --zip-file fileb://deployment-package.zip |