Skip to content

feat: port serverless function to lambda #1

feat: port serverless function to lambda

feat: port serverless function to lambda #1

Workflow file for this run

name: Deploy API
on:
push:
paths:
- api/**
- content/games/**
- content/movies/**
- content/shows/**
- content/books/**
env:
ONLY_SEED: true
jobs:
lint:
name: Lint Rust functions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clippy
run: cargo clippy
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Build website
run: pnpm build
- name: Setup Rust
uses: moonrepo/setup-rust@v1
with:
bins: cargo-lambda
targets: aarch64-unknown-linux-gnu
- name: Build
run: cargo lambda build --arm64 --release
- name: Deploy
run: cargo lambda deploy --include ./api/cataloguedb.db
env:
AWS_DEFAULT_REGION: eu-north-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}