Skip to content

Commit

Permalink
build(project): move typedoc generated docs to typedocs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoemp committed Oct 17, 2024
1 parent 89db357 commit 1b0de69
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
run: npm ci --legacy-peer-deps

- name: Create the docs directory locally in CI
run: npx typedoc && node runner.js prepare:docs
run: npx typedoc --out typedocs && node runner.js prepare:docs

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: docs
folder: typedocs

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# compiled output
dist
tmp
temp
/out-tsc

# dependencies
Expand Down Expand Up @@ -39,7 +40,6 @@ testem.log
Thumbs.db
/deployment/
/doc/
/docs
/deploy.config.json
/extern/

Expand All @@ -53,3 +53,4 @@ deploy
.nx/cache
.nx/workspace-data
/deploy.sh
/typedocs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "nx serve octra",
"build": "nx build octra",
"build:docs": "typedoc && node runner.js prepare:docs",
"build:docs": "typedoc --out typedocs && node runner.js prepare:docs",
"build:release": "node runner.js build:release",
"build:dev": "node runner.js build:dev",
"build:beta": "node runner.js build:beta",
Expand Down
4 changes: 2 additions & 2 deletions runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ const Project = {
await fs.copyFile(`./LICENSE.txt`, `./libs/ngx-utilities/LICENSE.txt`);
},
prepareDocs: async function () {
let content = await fs.readFile(`./docs/index.html`, 'utf-8');
let content = await fs.readFile(`./typedocs/index.html`, 'utf-8');
content = content.replace(/\.\/([^/]+)\/src\//g, (g0, g1) => {
return `modules/_octra_${g1.replace(/-/g, '_')}.html`;
});
content = content.replace(/apps\/([^/]+)\/src\//g, (g0, g1) => {
return `modules/_octra_${g1.replace(/-/g, '_')}.html`;
});
await fs.writeFile(`./docs/index.html`, content, {
await fs.writeFile(`./typedocs/index.html`, content, {
encoding: 'utf-8',
});
},
Expand Down

0 comments on commit 1b0de69

Please sign in to comment.