yes exactly π and that is the only way to get hold of a DO in next-on-pages π
yes exactly
and that is the only way to get hold of a DO in next-on-pages
and that is the only way to get hold of a DO in next-on-pages
@cloudflare/next-on-pages creates the worker that is deployed to your Pages project for youfast-glob work on next-on-pages?fs does not work within cloudflare pages?const normalizeSrc = src => {
return src.startsWith('/') ? src.slice(1) : src;
};
export default function cloudflareLoader ({ src, width, quality }) {
const params = [`width=${width}`];
if (quality) {
params.push(`quality=${quality}`);
}
const paramsString = params.join(',');
return `/cdn-cgi/image/${paramsString}/${normalizeSrc(src)}`;
};https://summit7-media.pages.dev/splash.pnghttps://summit7-media.pages.dev/cdn-cgi/image/width=96/splash.pngfast-globfsname: 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 }}