[MPT-16] Switching tabs is not reflected in query parameters #1118
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 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/master') || needs.pre_build.outputs.should_skip != 'true' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache Node modules | |
uses: actions/cache@v1 | |
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@v1 | |
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_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" @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@v2 | |
with: | |
name: mentorship-page-lambda-${{ github.sha }} | |
path: lambda/ | |
deploy: | |
needs: build | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v2 | |
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 |