-
Notifications
You must be signed in to change notification settings - Fork 8
31 lines (28 loc) · 1.02 KB
/
deploy-lambda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Deploy Nodejs Lambda
on:
push:
branches: [ "master" ]
tags: [ '*' ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Use Node.js 20.x
uses: actions/setup-node@main
with:
node-version: 20.x
cache: 'npm'
- name: predeploy
run: |
npm ci
npm run predeploy
- name: Setup AWS CLI
uses: aws-actions/configure-aws-credentials@main
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: deploy to AWS lambda
run: aws lambda update-function-code --function-name tileserver --zip-file fileb://dist/function.zip
#run: aws lambda create-function --dry-run --function-name tileserver --description "Deploy commit ${{github.sha}} by ${{github.actor}}" --runtime nodejs18.x --handler handler --role ${{ secrets.AWS_LAMBDA_TILESERVER_ROLE }} --zip-file fileb://dist/function.zip