Skip to content

Commit

Permalink
doc setup added
Browse files Browse the repository at this point in the history
shubhvjain committed Sep 24, 2024
1 parent e97165d commit f169b1a
Showing 6 changed files with 590 additions and 4 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Generate and Deploy JSDoc

on:
push:
branches:
- release
permissions:
contents: read
pages: write
id-token: write
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Generate JSDoc
run: npx jsdoc -c jsdoc.json
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './docs-static'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -130,4 +130,6 @@ dist
.pnp.*

.DS_Store
test_database_*
test_database_*

docs-static
1 change: 1 addition & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is where i write the documentation
21 changes: 21 additions & 0 deletions jsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"source": {
"include": ["src"],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"opts": {
"destination": "./docs-static",
"recurse": true,
"readme":"./index.md",
"tutorials": "./docs"
},
"plugins": [
"plugins/markdown"
],
"templates": {
"default": {
"outputSourceFiles": false
}
}
}
527 changes: 525 additions & 2 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "beanbagdb",
"version": "0.5.46",
"version": "0.5.50",
"description": "A JS library to introduce a schema layer to a No-SQL local database",
"main": "src/index.js",
"module": "src/index.js",
@@ -29,6 +29,7 @@
"ajv": "^8.17.1",
"chai": "^5.1.1",
"dotenv": "^16.4.5",
"jsdoc": "^4.0.3",
"mocha": "^10.7.3",
"nano": "^10.1.4",
"pouchdb": "^9.0.0",

0 comments on commit f169b1a

Please sign in to comment.