Switch to static export with build-time data fetching
- Change from server-side rendering to static export - Fetch data at build time and save as JSON - Remove API routes and tests, use static JSON file - Switch back to WEB platform from WEB_COMPUTE - Update build test for static export - Exclude out directory from security scan - Much simpler and more reliable approach
This commit is contained in:
@@ -9,11 +9,10 @@ frontend:
|
||||
- env | grep CONFLUENCE | sed 's/=.*/=***/'
|
||||
build:
|
||||
commands:
|
||||
- npx tsx scripts/fetch-data.js
|
||||
- npm run build
|
||||
- cp -r .next/static .next/standalone/.next/
|
||||
- cp .next/standalone/.next/required-server-files.json .next/standalone/
|
||||
artifacts:
|
||||
baseDirectory: .next/standalone
|
||||
baseDirectory: out
|
||||
files:
|
||||
- '**/*'
|
||||
cache:
|
||||
|
||||
Reference in New Issue
Block a user