Merge pull request #67 from dag-hammarskjold-library/dependabot/pip/w… #10
Workflow file for this run
This file contains 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
on: | |
push: | |
branches: [ master ] | |
jobs: | |
deploy-Lambda-function: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Setting up AWS Credentials | |
run: | | |
pip install awscli | |
aws configure set region us-east-1 | |
aws configure set output json | |
aws configure set aws_access_key_id ${{secrets.AWS_ACCESS_KEY_ID}} | |
aws configure set aws_secret_access_key ${{secrets.AWS_SECRET_ACCESS_KEY}} | |
- name: Create virtual environment | |
working-directory: ./aws-lambda | |
run: | | |
pip install virtualenv | |
python3 -m virtualenv venv | |
- name: Install requiremenents | |
working-directory: ./aws-lambda | |
run: | | |
. venv/bin/activate | |
python3 -m pip install --upgrade pip | |
pip install -r requirements.txt | |
deactivate | |
- name: Deploy | |
working-directory: ./aws-lambda | |
run: | | |
. venv/bin/activate | |
lambda deploy |