Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Changes for fixing docs (#4220)
Browse files Browse the repository at this point in the history
* Moved docs to root folder

* Updated documentation configurations

* Temporarily removed check for release

* Fixes in build commands

* Fix for install failed

* Restored release trigger on non pr flows only.
  • Loading branch information
hanzlamateen authored Nov 26, 2021
1 parent cdbf3b9 commit 439d4b7
Show file tree
Hide file tree
Showing 72 changed files with 316 additions and 290 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ jobs:
if [ ${{ secrets.DOCUMENTATION_BUILD_ENABLED }} == 'true' ]; then
echo "::set-output name=ok::enabled"
fi
# checks:
# if: github.event_name != 'push'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: 16.x
# - name: Test Build
# env:
# NODE_OPTIONS: --max_old_space_size=8192
# run: |
# npm install --production=false --legacy-peer-deps
# cd packages/docs
# npm install --production=false --legacy-peer-deps
# npm run build
checks:
if: github.event_name != 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Test Build
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |
npm install --production=false --legacy-peer-deps
cd docs
npm install --production=false --legacy-peer-deps
npm run build
gh-release:
needs:
- secrets-gate
Expand All @@ -57,6 +57,6 @@ jobs:
git config --global user.email "actions@github.com"
git config --global user.name "gh-actions"
npm install --production=false --legacy-peer-deps
cd packages/docs
cd docs
npm install --production=false --legacy-peer-deps
npm run deploy
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ bin/
# JetBrains WebStorm/PhpStorm
.idea

# Hugo publish files
packages/docs/public/
# Docs generated file
/docs/docs/generated/

.history
.history/*
Expand Down Expand Up @@ -167,3 +167,4 @@ certs/
/packages/client/public/projects/*
/packages/projects/projects/*
/packages/client/optimizeDeps.json

File renamed without changes.
1 change: 0 additions & 1 deletion packages/docs/.gitignore β†’ docs/.gitignore
100755 β†’ 100644
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

docs/**/**
docs-client/
docs-client-core/
docs-client-common/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
209 changes: 209 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
/** @type {import('@docusaurus/types').DocusaurusConfig} */

const commonExludePaths = [
'**/node_modules/**',
'**/dist/**',
'**/tests/**'
];

/**
*
* @author Abhinav Shah
* @author Hanzla Mateen
*/
module.exports = {
title: 'xrengine',
tagline:
'An end-to-end solution for hosting humans and AI in a virtual space, built on top of react, three.js and express/feathers.',
url: 'https://xrfoundation.github.io',
baseUrl: '/xrengine-docs/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon:
'https://github.com/xrfoundation/xrengine/raw/dev/xrengine%20black.png',
organizationName: 'XRFoundation', // Usually your GitHub org/user name.
projectName: 'xrengine-docs', // Usually your repo name.
plugins: [
// [
// 'docusaurus-plugin-typedoc',
// {
// id: 'client',
// entryPoints: ['../packages/client/src/main.tsx'],
// entryPointStrategy: 'expand',
// tsconfig: '../packages/client/tsconfig.json',
// exclude: [
// ...commonExludePaths,
// '../packages/client/vite.config.js',
// '../packages/client/jest.config.js',
// '../packages/client/public/**',
// '../packages/client/lib/**',
// '../packages/client/scripts/**'
// ],
// out: 'generated/client',
// readme: 'none',
// },
// ],
// [
// 'docusaurus-plugin-typedoc',
// {
// id: 'client-core',
// entryPoints: ['../packages/client-core'],
// entryPointStrategy: 'expand',
// tsconfig: '../packages/client-core/tsconfig.json',
// exclude: [
// ...commonExludePaths,
// '../packages/client-core/build.js',
// '../packages/client-core/rollup.config.js',
// '../packages/client-core/jest.config.js',
// '../packages/client-core/scripts/**',
// ],
// out: 'generated/client-core',
// readme: 'none',
// },
// ],
[
'docusaurus-plugin-typedoc',
{
id: 'server',
entryPoints: ['../packages/server'],
entryPointStrategy: 'expand',
tsconfig: '../packages/server/tsconfig.json',
exclude: [
...commonExludePaths,
'../packages/server/public/**',
'../packages/server/scripts/**',
'../packages/server/tests old/**',
'../packages/server/.eslintrc.js',
],
out: 'generated/server',
readme: 'none',
},
],
[
'docusaurus-plugin-typedoc',
{
id: 'server-core',
entryPoints: ['../packages/server-core/src/'],
entryPointStrategy: 'expand',
tsconfig: '../packages/server-core/tsconfig.json',
exclude: [
...commonExludePaths,
'../packages/server-core/scripts/**',
'../packages/server-core/.eslintrc.js',
'../packages/server-core/.mocharc.js',
'../packages/server-core/rollup.config.js',
'../packages/server-core/vite.build.js'
],
out: 'generated/server-core',
readme: 'none',
},
],
[
'docusaurus-plugin-typedoc',
{
id: 'common',
entryPoints: ['../packages/common'],
entryPointStrategy: 'expand',
tsconfig: '../packages/common/tsconfig.json',
exclude: [
...commonExludePaths,
'../packages/common/scripts/**',
'../packages/common/.eslintrc.cjs',
'../packages/common/rollup.config.js',
'../packages/common/vite.build.js'
],
out: 'generated/common',
readme: 'none',
},
],
[
'docusaurus-plugin-typedoc',
{
id: 'engine',
entryPoints: ['../packages/engine/src/'],
entryPointStrategy: 'expand',
tsconfig: '../packages/engine/tsconfig.json',
exclude: [
...commonExludePaths,
'../packages/engine/scripts/**',
'../packages/engine/.mocharc.js',
'../packages/engine/rollup.config.js',
'../packages/engine/vite.build.js',
'../packages/engine/src/physics/physx/physx.release.cjs.js',
'../packages/engine/src/physics/physx/physx.release.esm.js',
],
out: 'generated/engine',
readme: 'none',
},
],
[
'docusaurus-plugin-typedoc',
{
id: 'gameserver',
entryPoints: ['../packages/gameserver/src/'],
entryPointStrategy: 'expand',
tsconfig: '../packages/gameserver/tsconfig.json',
exclude: [
...commonExludePaths,
'../packages/gameserver/.eslintrc.cjs',
'../packages/gameserver/.mocharc.js',
'../packages/gameserver/vite.build.js'
],
out: 'generated/gameserver',
readme: 'none',
},
],
],
themeConfig: {
navbar: {
title: 'XREngine',
logo: {
alt: 'Logo',
src: 'https://github.com/XRFoundation/XREngine/raw/dev/xrengine%20black.png',
},
items: [
{
to: 'docs/',
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.gg/mQ3D4FE',
},
{
label: 'Github',
href: 'https://github.com/XRFoundation/XREngine',
}
],
},
],
copyright: `Copyright Β© ${new Date().getFullYear()} XRFoundation.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl:
'https://github.com/XRFoundation/XREngine/packages/docs/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
}
File renamed without changes.
87 changes: 87 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/**
*
* @author Abhinav Shah
* @author Hanzla Mateen
*/
module.exports = {
sidebar: {
'Getting Started': [
'introduction',
'installation',
'coreconcepts',
'architecture',
'contributing',
{
type: 'category',
label: 'Packages',
collapsed: false,
items: [
// {
// type: 'category',
// label: 'client',
// collapsed: true,
// items: [{
// type: 'autogenerated',
// dirName: 'generated/client',
// }],
// },
// {
// type: 'category',
// label: 'client-core',
// collapsed: true,
// items: [{
// type: 'autogenerated',
// dirName: 'generated/client-core',
// }],
// },
{
type: 'category',
label: 'server',
collapsed: true,
items: [{
type: 'autogenerated',
dirName: 'generated/server',
}],
},
{
type: 'category',
label: 'server-core',
collapsed: true,
items: [{
type: 'autogenerated',
dirName: 'generated/server-core',
}],
},
{
type: 'category',
label: 'common',
collapsed: true,
items: [{
type: 'autogenerated',
dirName: 'generated/common',
}],
},
{
type: 'category',
label: 'engine',
collapsed: true,
items: [{
type: 'autogenerated',
dirName: 'generated/engine',
}],
},
{
type: 'category',
label: 'gameserver',
collapsed: true,
items: [{
type: 'autogenerated',
dirName: 'generated/gameserver',
}],
},
],
},
],
},
};

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
17 changes: 0 additions & 17 deletions packages/docs/blog/2019-05-29-hello-world.md

This file was deleted.

Loading

0 comments on commit 439d4b7

Please sign in to comment.