From c9235ff0df92bd1986ac992ca577ee8629a9125d Mon Sep 17 00:00:00 2001 From: voynow Date: Tue, 6 Aug 2024 19:20:57 -0400 Subject: [PATCH] retry --- .github/workflows/deploy.yml | 7 ++++--- build.sh | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 176de39..ba2edb6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,12 +16,13 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: '3.8' # Specify your Python version + python-version: '3.12' - name: Install Poetry run: | curl -sSL https://install.python-poetry.org | python3 - export PATH="$HOME/.local/bin:$PATH" + poetry self add poetry-plugin-export - name: Install dependencies and package code run: ./build.sh @@ -31,10 +32,10 @@ jobs: with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 # Update as per your region + aws-region: us-east-1 - name: Deploy to Lambda run: | aws lambda update-function-code \ - --function-name my-lambda-function \ + --function-name strava \ --zip-file fileb://function.zip diff --git a/build.sh b/build.sh index b1951ed..e095ebc 100755 --- a/build.sh +++ b/build.sh @@ -1,12 +1,12 @@ #!/bin/bash rm -rf package -rm function.zip +rm -f function.zip poetry export -f requirements.txt --output requirements.txt --without-hashes pip install --target ./package -r requirements.txt -cd package +cd package || exit zip -r ../function.zip . cd .. zip -g function.zip src/lambda_function.py