feat(www): migrate www to cloudflare worker (#21)
* feat(www): switch to cloudflare workers * feat(turbo): add AWS environment variables to global config and build task * update readme
This commit is contained in:
parent
a75a369b82
commit
17fdb72be2
6 changed files with 566 additions and 32 deletions
63
apps/www/.gitignore
vendored
63
apps/www/.gitignore
vendored
|
|
@ -1,32 +1,51 @@
|
|||
# deps
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
|
||||
# vscode
|
||||
.vscode
|
||||
|
||||
# wrangler
|
||||
.wrangler/
|
||||
.dev.vars
|
||||
|
||||
# generated content
|
||||
.contentlayer
|
||||
.content-collections
|
||||
.source
|
||||
|
||||
# test & build
|
||||
/coverage
|
||||
/.next/
|
||||
/out/
|
||||
/build
|
||||
*.tsbuildinfo
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
/.pnp
|
||||
.pnp.js
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# others
|
||||
.env*.local
|
||||
.vercel
|
||||
next-env.d.ts
|
||||
|
||||
# sitemap
|
||||
/public/sitemap.xml
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ Open http://localhost:3000 with your browser to see the result.
|
|||
|
||||
## Content Management
|
||||
|
||||
### Docs
|
||||
|
||||
Docs are written in MDX in the contents/docs folder.
|
||||
|
||||
### Fetching Blog Content
|
||||
|
||||
This project includes a script to fetch blog content and images from an S3-compatible storage (Wasabi):
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
"fetch-content": "pnpm exec tsx ./scripts/fetch-content.mts",
|
||||
"cleanup-content": "pnpm exec tsx ./scripts/cleanup-content.mts",
|
||||
"refresh-content": "pnpm cleanup-content && pnpm fetch-content",
|
||||
"postinstall": "fumadocs-mdx"
|
||||
"postinstall": "fumadocs-mdx",
|
||||
"deploy": "wrangler deploy",
|
||||
"dev:wrangler": "wrangler dev"
|
||||
},
|
||||
"dependencies": {
|
||||
"@next/third-parties": "^15.3.2",
|
||||
|
|
@ -50,6 +52,7 @@
|
|||
"tailwindcss": "^4.1.5",
|
||||
"tsx": "^4.19.4",
|
||||
"tw-animate-css": "^1.2.9",
|
||||
"typescript": "^5.8.3"
|
||||
"typescript": "^5.8.3",
|
||||
"wrangler": "^4.20.3"
|
||||
}
|
||||
}
|
||||
7
apps/www/wrangler.jsonc
Normal file
7
apps/www/wrangler.jsonc
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "amical-www",
|
||||
"compatibility_date": "2025-06-20",
|
||||
"assets": {
|
||||
"directory": "./out"
|
||||
}
|
||||
}
|
||||
513
pnpm-lock.yaml
generated
513
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
"$schema": "https://turborepo.com/schema.json",
|
||||
"ui": "tui",
|
||||
"globalEnv": ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_REGION", "S3_BUCKET_NAME", "S3_ENDPOINT"],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["$TURBO_DEFAULT$", ".env*"],
|
||||
"outputs": [".next/**", "!.next/cache/**", "bin/**", "out/**"]
|
||||
"outputs": [".next/**", "!.next/cache/**", "bin/**", "out/**"],
|
||||
"env": ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_REGION", "S3_BUCKET_NAME", "S3_ENDPOINT"]
|
||||
},
|
||||
"build:native": {
|
||||
"dependsOn": [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue