Skip to content

Commit

Permalink
[fix] NPM ignore & GitHub actions bugs
Browse files Browse the repository at this point in the history
[optimize] update Upstream packages
  • Loading branch information
TechQuery committed Feb 10, 2024
1 parent 211d530 commit 77ce7ef
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 229 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CI & CD
on:
push:
branches:
- master
tags:
- v*
jobs:
Build-and-Deploy:
Build-and-Publish:
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
Expand All @@ -19,26 +19,30 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
cache: pnpm
- name: Install & Build
run: |
pnpm i --frozen-lockfile
pnpm build
- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Build & Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./dist
publish_dir: ./docs
personal_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true

- name: Deploy to Vercel
- name: Deploy to Vercel preview
uses: amondnet/vercel-action@v25
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
working-directory: ./docs
vercel-args: --prod
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
working-directory: ./docs
4 changes: 0 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#!/bin/sh

. "$(dirname "$0")/_/husky.sh"

npm test
4 changes: 0 additions & 4 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#!/bin/sh

. "$(dirname "$0")/_/husky.sh"

npm run build
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.editorconfig
.eslintrc.json
test/
.cache/
.parcel*
docs/
.vscode/
.husky/
.github/
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-web-widget",
"version": "4.0.0-rc.0",
"version": "4.0.0-rc.2",
"description": "Web Components library for GitHub based on WebCell",
"keywords": [
"github",
Expand All @@ -24,7 +24,7 @@
"main": "dist/index.umd.js",
"module": "dist/index.js",
"scripts": {
"prepare": "husky install",
"prepare": "husky",
"start": "rm -rf .parcel-cache/ docs/demo/ && cd test/ && parcel index.html --dist-dir ../docs/demo/ --open",
"pack-demo": "cd test/ && parcel build index.html --public-url . --dist-dir ../docs/demo/",
"test": "lint-staged",
Expand All @@ -35,12 +35,12 @@
"prepublishOnly": "npm test && npm run build"
},
"dependencies": {
"dom-renderer": "^2.0.6",
"dom-renderer": "^2.1.3",
"koajax": "^0.9.6",
"marked": "^11.1.1",
"marked": "^12.0.0",
"mobx": "^6.12.0",
"prismjs": "^1.29.0",
"web-cell": "^3.0.0-rc.7"
"web-cell": "^3.0.0-rc.15"
},
"peerDependencies": {
"bootstrap": "^5",
Expand All @@ -54,20 +54,20 @@
"@parcel/transformer-typescript-tsc": "~2.11.0",
"@parcel/transformer-typescript-types": "~2.11.0",
"@types/prismjs": "^1.26.3",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"cross-env": "^7.0.3",
"element-internals-polyfill": "^1.3.10",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^8.0.3",
"husky": "^9.0.10",
"iterable-observer": "^1.0.1",
"lint-staged": "^15.2.0",
"lint-staged": "^15.2.2",
"open-cli": "^8.0.0",
"parcel": "~2.11.0",
"prettier": "^3.2.2",
"typedoc": "^0.25.7",
"typedoc-plugin-mdn-links": "^3.1.12",
"prettier": "^3.2.5",
"typedoc": "^0.25.8",
"typedoc-plugin-mdn-links": "^3.1.15",
"typescript": "~5.3.3",
"web-utility": "^4.1.3"
},
Expand Down
Loading

1 comment on commit 77ce7ef

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for github-web-widget ready!

✅ Preview
https://github-web-widget-2yco8t9e0-techquery.vercel.app

Built with commit 77ce7ef.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.