Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Site Build
on:
push:
branches: [ deployment ]

jobs:
site-build:
runs-on: ubuntu-latest
container: node:22-alpine
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Yarn Dependencies
run: cd apps/front && yarn install
- name: Build Site
run: cd apps/front && npm run build:worker
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Site Deploy
on:
push:
tags:
- '*'

jobs:
site-deploy:
runs-on: ubuntu-latest
container:
image: node:22-alpine
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
NEXT_PUBLIC_STRAPI_API_TOKEN: ${{ secrets.NEXT_PUBLIC_STRAPI_API_TOKEN }}
NEXT_PUBLIC_STRAPI_BASE_URL: ${{ secrets.NEXT_PUBLIC_STRAPI_BASE_URL }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Yarn Dependencies
run: cd apps/front && yarn install
- name: Deploy Site
run: cd apps/front && npm run deploy:worker
7 changes: 7 additions & 0 deletions apps/front/open-next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// default open-next.config.ts file created by @opennextjs/cloudflare
import { defineCloudflareConfig } from "@opennextjs/cloudflare/config";
import kvIncrementalCache from "@opennextjs/cloudflare/kv-cache";

export default defineCloudflareConfig({
incrementalCache: kvIncrementalCache,
});
10 changes: 8 additions & 2 deletions apps/front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"version": "0.9.0",
"private": true,
"scripts": {
"build:worker": "opennextjs-cloudflare",
"dev:worker": "wrangler dev --port 8771",
"preview:worker": "npm run build:worker && npm run dev:worker",
"deploy:worker": "npm run build:worker && wrangler deploy",
"dev": "next dev",
"build": "next build",
"start": "next start",
Expand Down Expand Up @@ -30,11 +34,12 @@
"swiper": "^11.2.1"
},
"engines": {
"node": ">=18.0.0 <=20.x.x",
"node": ">=18.0.0 <=22.x.x",
"npm": ">=6.0.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@opennextjs/cloudflare": "^0.5.8",
"@types/node": "^20",
"@types/qs": "^6.9.18",
"@types/react": "^18.2.45",
Expand All @@ -45,6 +50,7 @@
"eslint-config-next": "15.1.3",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
"typescript": "^5",
"wrangler": "^3.114.0"
}
}
12 changes: 12 additions & 0 deletions apps/front/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"main": ".open-next/worker.js",
"name": "ai-nekko-web",
"compatibility_date": "2024-09-23",
"compatibility_flags": [
"nodejs_compat"
],
"assets": {
"directory": ".open-next/assets",
"binding": "ASSETS"
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
"private": true,
"workspaces": {
"packages": [
"apps/*"
"apps/front/"
],
"nohoist": [
"**/@strapi/strapi",
"**/@strapi/**"
]
},
"scripts": {
"build:worker": "opennextjs-cloudflare",
"dev:worker": "wrangler dev --port 8771",
"preview:worker": "npm run build:worker && npm run dev:worker",
"deploy:worker": "npm run build:worker && wrangler deploy",
"build": "turbo run build --filter=apps/front",
"dev": "turbo run dev --filter=apps/front",
"lint": "turbo run lint",
Expand All @@ -20,6 +24,8 @@
"commit": "git-cz"
},
"devDependencies": {
"@opennextjs/cloudflare": "^0.5.8",
"wrangler": "^3.114.0",
"turbo": "1.10.6"
},
"engines": {
Expand Down