Skip to content

Commit

Permalink
ci: cloudflare
Browse files Browse the repository at this point in the history
  • Loading branch information
futrime committed Oct 31, 2024
1 parent 5937d16 commit 6d6a516
Show file tree
Hide file tree
Showing 5 changed files with 2,698 additions and 18 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,22 @@ jobs:
pnpm ci
- run: |
pnpm run build
pnpm build
build-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- run: |
pnpm ci
- run: |
pnpm pages:build
lint:
runs-on: ubuntu-latest
Expand All @@ -32,4 +47,4 @@ jobs:
pnpm ci
- run: |
pnpm run lint
pnpm lint
7 changes: 7 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const WindiCSSWebpackPlugin = require("windicss-webpack-plugin");
const { setupDevPlatform } = require('@cloudflare/next-on-pages/next-dev');

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand All @@ -19,4 +20,10 @@ const nextConfig = {
},
};

if (process.env.NODE_ENV === 'development') {
(async () => {
await setupDevPlatform();
})();
}

module.exports = nextConfig;
14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{
"name": "levimc.org",
"version": "0.0.1",
"author": {
"name": "LiteLDev",
"email": "[email protected]",
"url": "https://litebds.com"
},
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"postbuild": "next-sitemap",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"pages:build": "pnpm dlx @cloudflare/next-on-pages",
"preview": "pnpm pages:build && wrangler pages dev",
"deploy": "pnpm pages:build && wrangler pages deploy"
},
"dependencies": {
"@fontsource/poppins": "5.0.14",
Expand All @@ -26,6 +21,7 @@
"swr": "2.2.5"
},
"devDependencies": {
"@cloudflare/next-on-pages": "^1.13.5",
"@svgr/webpack": "8.1.0",
"@types/node": "20.14.11",
"@types/react": "18.3.3",
Expand Down
Loading

0 comments on commit 6d6a516

Please sign in to comment.