diff --git a/examples/README.md b/examples/README.md index f282e5dc4..134f87ccb 100644 --- a/examples/README.md +++ b/examples/README.md @@ -26,3 +26,8 @@ $ npm run dev ``` Open the browser and go to the URL that is printed in the terminal. + +## Releasing an example to https://yorkie.dev + +To release an example, the example should export static files to `./dist` directory when running `npm run build`. +After the example is merged to the `main` branch, it is automatically deployed to https://yorkie.dev/yorkie-js-sdk/examples/{EXAMPLE-NAME}. diff --git a/examples/nextjs-scheduler/next.config.js b/examples/nextjs-scheduler/next.config.js index 767719fc4..5d299f889 100644 --- a/examples/nextjs-scheduler/next.config.js +++ b/examples/nextjs-scheduler/next.config.js @@ -1,4 +1,8 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {} +const nextConfig = { + output: 'export', + distDir: 'dist', + basePath: '/yorkie-js-sdk/examples/nextjs-scheduler', +}; -module.exports = nextConfig +module.exports = nextConfig; diff --git a/examples/nextjs-scheduler/package.json b/examples/nextjs-scheduler/package.json index a3bb194ae..22f3c3bea 100644 --- a/examples/nextjs-scheduler/package.json +++ b/examples/nextjs-scheduler/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev -p 5173", - "build": "next build", + "build": "next build && touch ./dist/.nojekyll", "start": "next start", "lint": "next lint" },