Ah so you're not using next-on-pages? In that case it'd probably be better to ask in <#1063191651796
Ah so you're not using next-on-pages? In that case it'd probably be better to ask in pages-help or workers-and-pages-help
@cloudflare/next-on-pages when building the application, which builds a your Next.js app in a format that can be deployed as a full-stack app on Cloudflare Pages. There should be not be a separate worker from your Pages project if you're using Next.js API routes.

cache: 'no-store' in your fetch. by default, nextjs tries to cache fetch requests@cloudflare/next-on-pages generates a worker that would handle incoming requests to your app, and properly route requests to dynamic routes._redirects wouldn't work because the worker takes priority over the redirects in that fileimport { FunctionComponent } from "react";
import AgendaAdminPage from "./AgendaAdminPage";
import { Package } from "@/types/package";
import { Calendar } from "@/types/calendar";
const Agenda: FunctionComponent = async () => {
const dates = (await fetch(process.env.NEXT_PUBLIC_HOST + "/api/agenda", {
headers: {
"CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID,
"CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET,
} as HeadersInit,
})
.then((res) => res.json())
.catch((err) => console.log(err))) as Calendar[];
console.log(dates);
const packages = (await fetch(process.env.NEXT_PUBLIC_HOST + "/api/package", {
headers: {
"CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID,
"CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET,
} as HeadersInit,
})
.then((res) => res.json())
.catch((err) => console.log(err))) as Package[];
console.log(packages);
return <AgendaAdminPage dates={dates} packages={packages} />;
};
export default Agenda;name: Deploy Production
on:
push:
branches:
- master
jobs:
deploy:
runs-on: pages-build
name: Deploy
steps:
- uses: actions/checkout@v3
- name: Build
shell: bash
run: npm ci && npm run pages:build
env:
NODE_OPTIONS: ${{ vars.NODE_OPTIONS }}
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy .vercel/output/static --project-name=PROJECT_NAME_HERE