Skip to content

Commit

Permalink
Merge pull request #3 from FiddlyDigital:devDocs
Browse files Browse the repository at this point in the history
Adding Doc Generation
  • Loading branch information
FiddlyDigital committed Jul 11, 2023
2 parents 968088c + 51c2570 commit 7dbbbda
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
tests
build
dist
dist
docs
39 changes: 31 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,45 @@
name: NPM Publish
name: Release Pipeline

on:
push:
branches:
- main

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- name: Checkout the repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- run: npm i
- run: npm run build
- run: npm run test
- uses: JS-DevTools/npm-publish@v1
node-version: 18

- name: Install Package Dependencies
run: npm ci

- name: Build the Package
run: npm run build

- name: Run Tests
run: npm run test

- name: Publish Package to NPM 🚀
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public

- name: Generate Documentation
run: npm run docs:generate

- name: Publish Docs to ghpages 📕
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*.swp

dist
docs
build
coverage
lib-cov
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
],
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
"docs:generate": "typedoc --options ./typedoc.json",
"docs:host": "http-server -p 3030 -c -1",
"lint": "eslint --ignore-path .eslintignore --ext .js,.ts .",
"test": "jest tests --verbose --config=./tests/jest.config.cjs"
},
Expand All @@ -52,9 +54,11 @@
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-promise": "^6.1.1",
"http-server": "^14.1.1",
"jest": "^29.5.0",
"ts-jest": "^29.1.0",
"tsup": "^7.1.0",
"typedoc": "^0.24.8",
"typescript": "^5.1.3"
}
}
}
5 changes: 5 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["./src/index.ts"],
"out": "docs"
}

0 comments on commit 7dbbbda

Please sign in to comment.