No, it's a tool that you can use when building your app. It's typically used as part of the build co
No, it's a tool that you can use when building your app. It's typically used as part of the build command in your Pages project settings
fast-glob work on next-on-pages?fs does not work within cloudflare pages?name: Deploy
on:
push:
branches:
- 'releases/**'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
#
# Build web app
#
- name: Build web
run: pnpm run pages:build
#
# Deploy to Cloudflare Pages
#
- name: Publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: project-name
directory: .vercel/output/static
gitHubToken: ${{ secrets.GITHUB_TOKEN }}interface CloudflareEnv {
DB: D1Database;
}import { D1Database } from "@cloudflare/workers-types";
import { drizzle } from "drizzle-orm/d1";
import { getRequestContext } from "@cloudflare/next-on-pages";
export const db = drizzle(
process.env.NODE_ENV === "development"
? getRequestContext().env.DB
: (process.env as unknown as CloudflareEnv).DB,
);import NextAuth, { type DefaultSession } from "next-auth";
import AzureAD from "next-auth/providers/azure-ad";
import { NextResponse } from "next/server";
import { DrizzleAdapter } from "@auth/drizzle-adapter";
import { db } from "@/db/db-connection";
export const {
handlers: { GET, POST },
auth,
signIn,
} = NextAuth({
secret: process.env.NEXTAUTH_SECRET as string,
trustHost: true,
session: {
strategy: "database",
},
adapter: DrizzleAdapter(db),
providers: [
//...provider stuff
],
callbacks: {
//...callback stuff
},
});09:47:38.194 ⚡️ Build log saved to '.vercel/output/static/_worker.js/nop-build-log.json'
09:47:38.194 ⚡️ Generated '.vercel/output/static/_worker.js/index.js'.
09:47:38.194 ⚡️ Build completed in 2.80s
09:47:38.257 Finished
09:47:38.257 Note: No functions dir at /functions found. Skipping.
09:47:38.257 Validating asset output directory
09:47:38.258 Error: Output directory " .vercel/output/static" not found.
09:47:39.593 Failed: build output directory not found