Skip to content

upgrade dependencies #12

upgrade dependencies

upgrade dependencies #12

name: Deploy AWS CDK
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
# these permissions are needed to interact with GitHub's OIDC Token endpoint
permissions:
id-token: write
contents: read
env:
AWS_DEFAULT_REGION: us-east-1
NODE_OPTIONS: --max-old-space-size=4096
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Setup Cargo cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
functions/counter/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Install Cargo Lambda
run: |
pip install cargo-lambda
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install yarn dependencies
run: |
yarn
- uses: goto-bus-stop/setup-zig@v2
- name: Build Lambda function
run: |
yarn build-function
ls functions/counter/target/lambda/counter/bootstrap
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: gh-actions-sean-krail-website-backend-main
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: AWS CDK Synth
run: |
yarn build
yarn cdk synth
- name: AWS CDK Diff
run: |
yarn cdk diff
- name: AWS CDK Deploy
run: |
yarn cdk deploy --require-approval never