Skip to content

Commit

Permalink
retry
Browse files Browse the repository at this point in the history
  • Loading branch information
voynow committed Aug 6, 2024
1 parent 904f83a commit c9235ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c9235ff

Please sign in to comment.