Skip to content

Commit

Permalink
chore(ci): Add the NextAuth 4 example to CI (#471)
Browse files Browse the repository at this point in the history
I forgot that this needed to be added to CI and merge queue.
  • Loading branch information
blaine-arcjet authored Apr 3, 2024
1 parent b7a1901 commit a3ad83a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/reusable-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,48 @@ jobs:
working-directory: examples/nextjs-14-decorate
run: npm run build

nextjs-14-nextauth-4:
name: Next.js 14 + NextAuth 4
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# Environment security
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
fonts.googleapis.com:443
fonts.gstatic.com:443
github.com:443
registry.npmjs.org:443
# Checkout
# Most toolchains require checkout first
- name: Checkout
uses: actions/checkout@v4

# Language toolchains
- name: Install Node
uses: actions/[email protected]
with:
node-version: 20

# Workflow

- name: Install dependencies
run: npm ci

- name: Install example dependencies
working-directory: examples/nextjs-14-nextauth-4
run: npm ci

- name: Build
working-directory: examples/nextjs-14-nextauth-4
run: npm run build

nextjs-14-openai:
name: Next.js 14 + OpenAI
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ merge:
- Build examples / Next.js 14 + Clerk + Rate Limit
- Build examples / Next.js 14 + Clerk + Shield
- Build examples / Next.js 14 + Decorate
- Build examples / Next.js 14 + NextAuth 4
- Build examples / Next.js 14 + OpenAI
- Build examples / Next.js 14 + Page Router + withArcjet
2 changes: 1 addition & 1 deletion examples/nextjs-14-nextauth-4/app/api/arcjet/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getServerSession } from "next-auth";
import GithubProvider from "next-auth/providers/github";
import { NextResponse } from "next/server";

export const authOptions = {
const authOptions = {
// Configure one or more authentication providers
// See https://next-auth.js.org/configuration/initialization#route-handlers-app
providers: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import NextAuth from "next-auth";
import GithubProvider from "next-auth/providers/github";
import { NextResponse } from "next/server";

export const authOptions = {
const authOptions = {
// Configure one or more authentication providers
// See https://next-auth.js.org/configuration/initialization#route-handlers-app
providers: [
Expand Down

0 comments on commit a3ad83a

Please sign in to comment.