Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: include npm release and docs in gh-pages workflow #93

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy
on:
push:
tags:
- "*"

jobs:
publish-npm:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-doc:
runs-on: ubuntu-20.04
permissions:
pages: write
id-token: write
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranjanrak can't we update node-version to 20 ? is there any specific reason keeping node 16 ?


- uses: actions/checkout@v3
with:
submodules: true

- name: Install Dependencies
run: |
npm install
npm install -g jsdoc

- name: Building documentation for github page
run: jsdoc --configure ./.jsdoc.json

- name: Upload artifacts
uses: actions/upload-pages-artifact@v1
with:
path: docs/

- id: deployment
uses: actions/deploy-pages@v1
5 changes: 2 additions & 3 deletions .jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dictionaries": ["jsdoc"]
},
"source": {
"include": ["lib", "package.json", "README.md"],
"include": ["lib", "README.md"],
"includePattern": ".js$",
"excludePattern": "(node_modules/|docs)"
},
Expand All @@ -21,7 +21,6 @@
"encoding": "utf8",
"private": true,
"recurse": true,
"sort": false,
"template": "./node_modules/minami"
"sort": false
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The official Javascript node client for communicating with the [Kite Connect API

Kite Connect is a set of REST-like APIs that expose many capabilities required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio, stream live market data (WebSockets), and more, with the simple HTTP API collection.

[Zerodha Technology](http://zerodha.com) (c) 2018. Licensed under the MIT License.
[Zerodha Technology](http://zerodha.com) (c) 2023. Licensed under the MIT License.

## Documentation

Expand Down