use try since write will fail on aws lambda #30
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
name: deploy to lambda | |
on: [push] | |
jobs: | |
deploy_source: | |
name: build and deploy lambda | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
node-version: ['18'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install -g serverless | |
- run: npm install --save serverless-python-requirements | |
- run: serverless config credentials --provider aws --key ${{ secrets.AWS_ACCESS_KEY_ID }} --secret ${{ secrets.AWS_SECRET_ACCESS_KEY }} --verbose | |
- name: 'serverless deploy' | |
env: | |
ALPACA_API_KEY: ${{ secrets.ALPACA_API_KEY }} | |
ALPACA_API_SECRET: ${{ secrets.ALPACA_API_SECRET }} | |
run: serverless deploy --verbose --stage production --region us-west-1 |