Skip to content

Commit

Permalink
Create buildpsec.yml to install and zip libs
Browse files Browse the repository at this point in the history
  • Loading branch information
DEENUU1 committed Jan 1, 2024
1 parent 4428b6d commit e39d342
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/lambda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: AWS Lambda Deploy

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
env:
20 changes: 20 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
commands:
- echo "Installing dependencies..."
- pip install -r requirements.txt -t lib
build:
commands:
- echo "Zipping deployment package..."
- cd lib
- zip -r9 ../deployment_package.zip .
- cd ..
- zip -g deployment_package.zip lambda_function.py
post_build:
commands:
- echo "Updating lambda Function..."
- aws lambda update-function-code --function-name fjob_scrapers --zip-file fileb://deployment_package.zip
- echo "DONE!!"

0 comments on commit e39d342

Please sign in to comment.