diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 8be8cf57..6040c45b 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -43,12 +43,25 @@ jobs: uses: actions/configure-pages@v4 - name: Install dependencies run: npm ci + # Run tests and generate reports - name: Run Vitest to generate test reports run: npm run test:report + # Build doc - name: Build with VitePress run: npm run docs:build + # Build 2D playground + - name: Build playgrounds + run: ./node_modules/.bin/nx build @fibbojs/playground-2d + # Build 3D playground + - name: Build playgrounds + run: ./node_modules/.bin/nx build @fibbojs/playground-3d + # Move test reports to the docs folder - name: Move test reports to the docs folder run: mv html docs/.vitepress/dist/test-reports && mv fibbo/coverage docs/.vitepress/dist/coverage + # Move playgrounds to the docs folder + - name: Move playgrounds to the docs folder + run: mv apps/playground-2d/dist docs/.vitepress/dist/playground-2d && mv apps/playground-3d/dist docs/.vitepress/dist/playground-3d + # Upload artifacts - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/README.md b/README.md index ec5c366f..4a9508ab 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,9 @@ Core package for the Fibbo web game engine, based on [three.js](https://threejs.org/) and [Rappier](https://rapier.rs/). - [๐Ÿก Documentation](https://fibbojs.github.io/fibbo/) +- [๐Ÿงช Test Report](https://fibbojs.github.io/fibbo/test-reports) +- [๐ŸŽฎ 2D Playground](https://fibbojs.github.io/fibbo/playground-2d) +- [๐ŸŽฎ 3D Playground](https://fibbojs.github.io/fibbo/playground-3d) ## Development diff --git a/apps/playground-2d/vite.config.ts b/apps/playground-2d/vite.config.ts index 7e2bc751..c888aed9 100644 --- a/apps/playground-2d/vite.config.ts +++ b/apps/playground-2d/vite.config.ts @@ -7,4 +7,5 @@ export default defineConfig({ wasm(), topLevelAwait(), ], + base: '/fibbo/playground-2d/', }) diff --git a/apps/playground-3d/vite.config.ts b/apps/playground-3d/vite.config.ts index 7e2bc751..6152ee1c 100644 --- a/apps/playground-3d/vite.config.ts +++ b/apps/playground-3d/vite.config.ts @@ -7,4 +7,5 @@ export default defineConfig({ wasm(), topLevelAwait(), ], + base: '/fibbo/playground-3d/', })