Skip to content

Commit 77ce7ef

Browse files
committed
[fix] NPM ignore & GitHub actions bugs
[optimize] update Upstream packages
1 parent 211d530 commit 77ce7ef

File tree

9 files changed

+228
-229
lines changed

9 files changed

+228
-229
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: CI & CD
22
on:
33
push:
4-
branches:
5-
- master
4+
tags:
5+
- v*
66
jobs:
7-
Build-and-Deploy:
7+
Build-and-Publish:
88
env:
99
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
1010
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
@@ -19,26 +19,30 @@ jobs:
1919
- uses: actions/setup-node@v3
2020
with:
2121
node-version: 18
22+
registry-url: https://registry.npmjs.org
2223
cache: pnpm
23-
- name: Install & Build
24-
run: |
25-
pnpm i --frozen-lockfile
26-
pnpm build
24+
- name: Install Dependencies
25+
run: pnpm i --frozen-lockfile
26+
27+
- name: Build & Publish
28+
run: npm publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2731

2832
- name: Deploy to GitHub pages
2933
uses: peaceiris/actions-gh-pages@v3
3034
with:
31-
publish_dir: ./dist
35+
publish_dir: ./docs
3236
personal_token: ${{ secrets.GITHUB_TOKEN }}
3337
force_orphan: true
3438

35-
- name: Deploy to Vercel
39+
- name: Deploy to Vercel preview
3640
uses: amondnet/vercel-action@v25
3741
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
3842
with:
3943
vercel-token: ${{ secrets.VERCEL_TOKEN }}
4044
github-token: ${{ secrets.GITHUB_TOKEN }}
4145
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
4246
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
43-
working-directory: ./dist
47+
working-directory: ./docs
4448
vercel-args: --prod

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
github-token: ${{ secrets.GITHUB_TOKEN }}
3333
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
3434
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
35-
working-directory: ./dist
35+
working-directory: ./docs

.husky/pre-commit

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
#!/bin/sh
2-
3-
. "$(dirname "$0")/_/husky.sh"
4-
51
npm test

.husky/pre-push

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
#!/bin/sh
2-
3-
. "$(dirname "$0")/_/husky.sh"
4-
51
npm run build

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.editorconfig
22
.eslintrc.json
33
test/
4-
.cache/
4+
.parcel*
55
docs/
66
.vscode/
7+
.husky/
78
.github/

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "github-web-widget",
3-
"version": "4.0.0-rc.0",
3+
"version": "4.0.0-rc.2",
44
"description": "Web Components library for GitHub based on WebCell",
55
"keywords": [
66
"github",
@@ -24,7 +24,7 @@
2424
"main": "dist/index.umd.js",
2525
"module": "dist/index.js",
2626
"scripts": {
27-
"prepare": "husky install",
27+
"prepare": "husky",
2828
"start": "rm -rf .parcel-cache/ docs/demo/ && cd test/ && parcel index.html --dist-dir ../docs/demo/ --open",
2929
"pack-demo": "cd test/ && parcel build index.html --public-url . --dist-dir ../docs/demo/",
3030
"test": "lint-staged",
@@ -35,12 +35,12 @@
3535
"prepublishOnly": "npm test && npm run build"
3636
},
3737
"dependencies": {
38-
"dom-renderer": "^2.0.6",
38+
"dom-renderer": "^2.1.3",
3939
"koajax": "^0.9.6",
40-
"marked": "^11.1.1",
40+
"marked": "^12.0.0",
4141
"mobx": "^6.12.0",
4242
"prismjs": "^1.29.0",
43-
"web-cell": "^3.0.0-rc.7"
43+
"web-cell": "^3.0.0-rc.15"
4444
},
4545
"peerDependencies": {
4646
"bootstrap": "^5",
@@ -54,20 +54,20 @@
5454
"@parcel/transformer-typescript-tsc": "~2.11.0",
5555
"@parcel/transformer-typescript-types": "~2.11.0",
5656
"@types/prismjs": "^1.26.3",
57-
"@typescript-eslint/eslint-plugin": "^6.19.0",
58-
"@typescript-eslint/parser": "^6.19.0",
57+
"@typescript-eslint/eslint-plugin": "^6.21.0",
58+
"@typescript-eslint/parser": "^6.21.0",
5959
"cross-env": "^7.0.3",
6060
"element-internals-polyfill": "^1.3.10",
6161
"eslint": "^8.56.0",
6262
"eslint-config-prettier": "^9.1.0",
63-
"husky": "^8.0.3",
63+
"husky": "^9.0.10",
6464
"iterable-observer": "^1.0.1",
65-
"lint-staged": "^15.2.0",
65+
"lint-staged": "^15.2.2",
6666
"open-cli": "^8.0.0",
6767
"parcel": "~2.11.0",
68-
"prettier": "^3.2.2",
69-
"typedoc": "^0.25.7",
70-
"typedoc-plugin-mdn-links": "^3.1.12",
68+
"prettier": "^3.2.5",
69+
"typedoc": "^0.25.8",
70+
"typedoc-plugin-mdn-links": "^3.1.15",
7171
"typescript": "~5.3.3",
7272
"web-utility": "^4.1.3"
7373
},

0 commit comments

Comments
 (0)