Skip to content

Commit 5034bfe

Browse files
committed
add actions and update demo
1 parent 1b3d158 commit 5034bfe

16 files changed

+75
-4
lines changed

.github/workflows/deploy-demo.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 📝 deploy demo
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: 'pages'
16+
cancel-in-progress: false
17+
18+
jobs:
19+
deploy:
20+
name: 🚀 Deploy
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: 📚 Checkout
27+
uses: actions/checkout@v3
28+
- name: Setup Pages
29+
uses: actions/configure-pages@v3
30+
- name: Upload artifact
31+
uses: actions/upload-pages-artifact@v1
32+
with:
33+
path: './demo'
34+
- name: 🚀 Deploy to GitHub Pages
35+
id: deployment
36+
uses: actions/deploy-pages@v2
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 🚀 publish to npm
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
release:
9+
name: 🚀 Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 📚 Checkout
13+
uses: actions/checkout@v3
14+
- name: 🟢 Node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
registry-url: 'https://registry.npmjs.org'
19+
- name: 🚀 Publish
20+
run: npm publish --provenance --access public
21+
env:
22+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

.npmignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.github
2+
demo
3+
lib
4+
src
5+
.gitignore
6+
env.d.ts
7+
index.html
8+
Makefile
9+
tsconfig*
10+
yarn.lock
11+
vite.*

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
dev-docs:
1+
dev:
22
yarn dev-docs
3+
build:
4+
yarn build-lib && yarn build-docs
35
build-docs:
46
yarn build-docs
5-
preview-docs:
6-
yarn preview-docs
77
build-lib:
88
yarn build-lib
9+
preview:
10+
yarn preview-docs

0 commit comments

Comments
 (0)