Skip to content

Commit dec9193

Browse files
committed
Publish to npm
1 parent 3d16c19 commit dec9193

File tree

3 files changed

+40
-10
lines changed

3 files changed

+40
-10
lines changed

.github/workflows/docs.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
name: Deploy VitePress site to Pages
2+
name: Deploy docs to Pages
33

44
on:
5-
release:
6-
types: [ published ]
5+
push:
6+
branches: main
77
workflow_dispatch:
88

99
permissions:
@@ -30,11 +30,6 @@ jobs:
3030
uses: actions/configure-pages@v4
3131
- name: Install dependencies
3232
run: bun install
33-
- name: Cache dependencies
34-
uses: actions/cache@v4
35-
with:
36-
path: ~/.bun/install/cache
37-
key: ${{ runner.os }}-${{ hashFiles('**/bun.lockb') }}
3833
- name: Build with VitePress
3934
run: bun run docs:build
4035
- name: Upload artifact

.github/workflows/publish.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish to NPM
2+
3+
on:
4+
push:
5+
branches: main
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: "20"
15+
- run: npm install
16+
- uses: JS-DevTools/npm-publish@v3
17+
with:
18+
token: ${{ secrets.NPM_TOKEN }}

package.json

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
{
2-
"name": "vortex",
3-
"type": "module",
2+
"name": "@westacks/vortex",
3+
"version": "0.0.1",
4+
"license": "MIT",
5+
"description": "Server-based routing for SPAs",
6+
"author": "Dmytro Morozov <puny.flash@gmail.com>",
7+
"homepage": "https://westacks.github.io/vortex/",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/westacks/vortex.git"
11+
},
12+
"bugs": {
13+
"url": "https://github.com/westacks/vortex/issues"
14+
},
15+
"keywords": [
16+
"spa",
17+
"routing",
18+
"vortex"
19+
],
420
"scripts": {
521
"build": "vite build",
622
"prepublishOnly": "npm run build",
@@ -22,6 +38,7 @@
2238
"files": [
2339
"dist"
2440
],
41+
"type": "module",
2542
"main": "./dist/index.cjs",
2643
"module": "./dist/index.js",
2744
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)