Skip to content

Commit 124cf99

Browse files
chore(build): update build process and GitHub Actions workflow
1 parent cca2a80 commit 124cf99

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.github/workflows/static.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy static content to Pages
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ["main"]
7+
branches: ['main']
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -18,7 +18,7 @@ permissions:
1818
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1919
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2020
concurrency:
21-
group: "pages"
21+
group: 'pages'
2222
cancel-in-progress: false
2323

2424
jobs:
@@ -31,13 +31,15 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v4
34+
- name: Build
35+
run: npm run demo:build
3436
- name: Setup Pages
3537
uses: actions/configure-pages@v5
3638
- name: Upload artifact
3739
uses: actions/upload-pages-artifact@v3
3840
with:
3941
# Upload entire repository
40-
path: './demo/'
42+
path: './dist/'
4143
- name: Deploy to GitHub Pages
4244
id: deployment
4345
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ node_modules
33

44
# npmrc
55
.npmrc
6+
7+
# build
8+
dist

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"types": "./src/index.d.ts",
1616
"scripts": {
1717
"dev": "vite demo",
18-
"format": "prettier --write",
18+
"demo:build": "vite build --outDir ../dist --emptyOutDir ./demo",
19+
"format": "prettier --write --ignore-unknown",
1920
"release": "release-it",
2021
"prepare": "husky"
2122
},

0 commit comments

Comments
 (0)