Skip to content

build(deps): bump next from 14.2.10 to 15.0.4 #1673

build(deps): bump next from 14.2.10 to 15.0.4

build(deps): bump next from 14.2.10 to 15.0.4 #1673

Workflow file for this run

name: Deploy Lambda
on:
pull_request:
push:
jobs:
pre_build:
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v4
with:
concurrent_skipping: "same_content_newer"
paths: '["scripts/**/*"]'
build:
needs: pre_build
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || needs.pre_build.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-lambda-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-lambda-
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: export VERSION_AIRTABLE=`node -p -e "require('./package-lock.json').packages['node_modules/airtable'].version"`
- run: export VERSION_AWS_SDK=`node -p -e "require('./package-lock.json').packages['node_modules/aws-sdk'].version"`
- run: export VERSION_ELASTICSEARCH=`node -p -e "require('./package-lock.json').packages['node_modules/@elastic/elasticsearch'].version"`
- run: rm package.json package-lock.json
- run: npm install --no-save airtable@"$VERSION_AIRTABLE" aws-sdk@"$VERSION_AWS_SDK" @elastic/elasticsearch@"$VERSION_ELASTICSEARCH"
- run: mkdir lambda
- run: cp scripts/load_mentors.js lambda/index.js
- run: cp -r node_modules/ lambda/
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: mentorship-page-lambda-${{ github.sha }}
path: lambda/
deploy:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: mentorship-page-lambda-${{ github.sha }}
path: lambda/
- run: cd lambda && zip -r ../lambda.zip .
- name: Deploy lambda
uses: appleboy/[email protected]
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: load_mentors
zip_file: lambda.zip