File tree Expand file tree Collapse file tree 5 files changed +328
-1
lines changed Expand file tree Collapse file tree 5 files changed +328
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy example
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ deploy :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+ - uses : actions/setup-node@v4
19+ - uses : pnpm/action-setup@v4
20+
21+ - name : Install & Build
22+ run : |
23+ pnpm install
24+ pnpm build
25+
26+ - name : Generate example
27+ run : pnpm run example
28+
29+ - name : Deploy with gh-pages
30+ run : |
31+ git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
32+ pnpm run deploy -u "github-actions-bot <support+actions@github.com>"
33+ env :
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 55.custom-report-directory
66.test-plugin
77.DS_store
8+ example
Original file line number Diff line number Diff line change 1818 "scripts" : {
1919 "build" : " rm -rf ./dist && tsc --project tsconfig.build.json && cp src/*.css dist" ,
2020 "test" : " vitest --coverage" ,
21- "typecheck" : " tsc --noEmit"
21+ "typecheck" : " tsc --noEmit" ,
22+ "example" : " node scripts/generate-example.mjs" ,
23+ "deploy" : " touch example/.nojekyll && gh-pages --dist example --dotfiles true"
2224 },
2325 "peerDependencies" : {
2426 "vite" : " >=4"
2527 },
2628 "devDependencies" : {
2729 "@types/node" : " ^22.4.1" ,
2830 "@vitest/coverage-v8" : " ^2.0.5" ,
31+ "gh-pages" : " ^6.1.1" ,
2932 "magic-string" : " ^0.30.11" ,
3033 "typescript" : " ^5.5.4" ,
3134 "vite" : " ^5.4.0" ,
You can’t perform that action at this time.
0 commit comments