Skip to content

Commit dba8cbc

Browse files
committed
Update publish.yml
2 parents ed41448 + 774546d commit dba8cbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1669
-6
lines changed

.github/workflows/deploy_docs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [19.x]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Install dependencies
23+
run: yarn install
24+
working-directory: ./docs
25+
- name: Build
26+
run: yarn build
27+
working-directory: ./docs
28+
- name: Deploy to GitHub Pages
29+
uses: JamesIves/github-pages-deploy-action@v4.5.0
30+
with:
31+
branch: gh-pages
32+
folder: ./docs/build

.github/workflows/publish.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Publish to NPM
22
on:
33
release:
4-
types: [created]
4+
types: [published]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
@@ -16,8 +16,17 @@ jobs:
1616
node-version: ${{ matrix.node-version }}
1717
registry-url: 'https://registry.npmjs.org'
1818
- name: Install dependencies and build
19-
run: npm run prepublish
20-
- name: Publish package
21-
run: npm publish
19+
run: yarn && yarn prepublish
20+
- name: Extract tag version
21+
id: extract_tag
22+
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
23+
- name: Update version in package.json
24+
run: |
25+
npm --no-git-tag-version version ${{ steps.extract_tag.outputs.VERSION }}
26+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
27+
git config --global user.name "github-actions[bot]"
28+
git commit -am "chore: bump version to ${{ steps.extract_tag.outputs.VERSION }}"
29+
- name: Publish to npm
30+
run: npm publish --access public
2231
env:
2332
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This project is loosely based on [Vulcan API](https://github.com/kapi2289/vulcan
1212

1313
## Docs
1414

15-
[Gitbook docs](https://capure.gitbook.io/vulcan-api-js/)
15+
You can find the docs [here](https://avorty.github.io/vulcan-api-js)
1616

1717
## License
1818

docs/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
21+
22+
# Other package managers
23+
pnpm-lock.yaml

docs/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

docs/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Contributing",
3+
"position": 5,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Some details on how to contribute to the project."
7+
}
8+
}

docs/docs/contributing/docs.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# Contributing to the docs
6+
7+
On every page you can find a link to the source file of the page. You can edit the file and create a pull request.
8+
9+
## Docusaurus
10+
11+
Our documentation uses Docusaurus. If you want to learn about Markdown or special features of Docusaurus you can look at the [Docusaurus documentation](https://docusaurus.io/docs).

docs/docs/contributing/general.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# General information
6+
7+
Contributions are welcome! We are happy to accept contributions in the form of pull requests, issues, or just general feedback and discussion.
8+
9+
## Contributing to the SDK
10+
11+
See [Contributing to the SDK](./sdk).
12+
13+
## Contributing to the documentation
14+
15+
See [Contributing to the documentation](./docs).
16+
17+
If you have any questions feel free to contact us.

docs/docs/contributing/sdk.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# Contributing to the SDK
6+
7+
You can look on the [list of issues](https://github.com/avorty/vulcan-api-js/issues) and pick one to work on. If you have an idea for a new feature, you can create an issue and discuss it with us.
8+
9+
## Running SDK in the development mode
10+
11+
We use yarn as a package manager.
12+
13+
1. First install the dependencies
14+
15+
```bash
16+
yarn install
17+
```
18+
19+
2. Then run the SDK in development mode
20+
21+
```bash
22+
yarn dev
23+
```

0 commit comments

Comments
 (0)