Feat/auth: Add session creation and authentication by Lucia v3 #29
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: Staging Deploy | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
quality: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Biome | |
uses: biomejs/setup-biome@v2 | |
with: | |
version: latest | |
- name: Run Biome | |
run: biome ci . || exit 1 | |
build-api: | |
runs-on: ubuntu-latest | |
needs: [quality] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check if API files changed | |
id: changed-files | |
uses: tj-actions/changed-files@v45 | |
with: | |
files: src/*.{ts,js} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install | |
if: steps.changed-files.outputs.any_changed == 'true' | |
uses: ./action.yaml | |
- name: Build API to Cloudflare bundle | |
if: steps.changed-files.outputs.any_changed == 'true' | |
run: bun wrangler deploy --dry-run --outdir dist | |
- name: Deploy API to Cloudflare Worker (Production) | |
if: steps.changed-files.outputs.any_changed == 'true' | |
run: bun run wrangler deploy |