Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,34 @@ name: CI & CD
on:
push:
branches:
- master
- '**'
jobs:
Build-and-Deploy:
runs-on: ubuntu-latest
permissions:
contents: write
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v3
if: ${{ !env.VERCEL_TOKEN || !env.VERCEL_ORG_ID || !env.VERCEL_PROJECT_ID }}
version: 10
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: pnpm
- name: Install Dependencies
if: ${{ !env.VERCEL_TOKEN || !env.VERCEL_ORG_ID || !env.VERCEL_PROJECT_ID }}
run: pnpm i --frozen-lockfile
- name: Install & Build
run: |
pnpm i --frozen-lockfile
pnpm build

- name: Build Production
if: ${{ !env.VERCEL_TOKEN || !env.VERCEL_ORG_ID || !env.VERCEL_PROJECT_ID }}
run: pnpm build

- name: Deploy Production
uses: peaceiris/actions-gh-pages@v3
if: ${{ !env.VERCEL_TOKEN || !env.VERCEL_ORG_ID || !env.VERCEL_PROJECT_ID }}
- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/master'
with:
publish_dir: ./dist
personal_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -45,5 +43,5 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./
vercel-args: --prod
working-directory: ./dist
vercel-args: ${{ github.ref == 'refs/heads/master' && '--prod' || '' }}
27 changes: 0 additions & 27 deletions .github/workflows/pull-request.yml

This file was deleted.

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ which is inspired by [WebCell scaffold][5].
## Technology stack

- Language: [TypeScript v5][2]
- Component engine: [React v18][1]
- Component engine: [React v19][1]
- State management: [MobX v6][3]
- Component suite: [Ant Design v5][4] + [Bootstrap v5][9] (CSS utilities)
- HTTP Client: [KoAJAX v1][10]
- Component suite: [Ant Design v6][4] + [Bootstrap v5][9] (CSS utilities)
- HTTP Client: [KoAJAX v3][10]
- PWA framework: [Workbox v7][11]
- Package bundler: [Parcel v2][12]
- CI / CD: GitHub [Actions][13] + [Pages][14]
Expand All @@ -31,7 +31,6 @@ which is inspired by [WebCell scaffold][5].
## Best practice

1. Install GitHub apps in your organization or account:

1. [Probot settings][15]: set up Issue labels & Pull Request rules
2. [PR badge][16]: set up Online [VS Code][17] editor entries in Pull Request description

Expand Down Expand Up @@ -83,6 +82,6 @@ pnpm build
[18]: https://github.com/new?template_name=React-MobX-Ant-Design-ts&template_owner=idea2app
[19]: https://github.com/idea2app/React-MobX-Ant-Design-ts/blob/ae6204a04c108eddff7ff5265341676b55918509/.github/workflows/main.yml#L10-L12
[20]: https://github.com/idea2app/React-MobX-Ant-Design-ts/settings/secrets/actions
[21]: https://github.com/kaiyuanshe/kaiyuanshe.github.io/blob/bb4675a56bf1d6b207231313da5ed0af7cf0ebd6/.github/workflows/pull-request.yml#L32-L56
[21]: https://github.com/idea2app/Lark-Next-Bootstrap-ts/blob/5c58fd8c6faf85a89a19a0358c315dc8909098e7/.github/workflows/main.yml#L31-L60
[22]: https://github.com/idea2app/React-MobX-Ant-Design-ts/issues/new/choose
[23]: https://github.com/idea2app/React-MobX-Ant-Design-ts/projects
80 changes: 49 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,60 @@
"url": "https://github.com/idea2app/React-MobX-Ant-Design-ts/issues"
},
"dependencies": {
"@ant-design/cssinjs": "^1.21.0",
"@ant-design/icons": "^5.3.7",
"antd": "^5.18.3",
"@ant-design/cssinjs": "^2.0.1",
"@ant-design/icons": "^6.1.0",
"antd": "^6.0.1",
"browser-unhandled-rejection": "^1.0.2",
"koajax": "^1.1.2",
"idb-keyval": "^6.2.2",
"koajax": "^3.1.2",
"lodash": "^4.17.21",
"mobx": "^6.12.4",
"mobx-github": "^0.3.2",
"mobx-i18n": "^0.5.0",
"mobx-react": "^9.1.1",
"mobx-react-helper": "^0.3.1",
"mobx-restful": "^1.0.0",
"mobx-restful-table": "^2.0.0-rc.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^6.24.0",
"react-router-class-tools": "^0.1.3",
"react-router-dom": "^6.24.0",
"web-utility": "^4.4.0"
"mobx": "^6.15.0",
"mobx-github": "^0.6.2",
"mobx-i18n": "^0.7.2",
"mobx-react": "^9.2.1",
"mobx-react-helper": "^0.5.1",
"mobx-restful": "^2.1.4",
"mobx-restful-table": "^2.6.2",
"preact": "^10.28.0",
"react": "npm:@preact/compat",
"react-dom": "npm:@preact/compat",
"react-router": "^7.10.0",
"react-router-class-tools": "^0.2.1",
"react-router-dom": "^7.10.0",
"web-utility": "^4.6.4"
},
"devDependencies": {
"@parcel/config-default": "~2.12.0",
"@parcel/packager-raw-url": "~2.12.0",
"@parcel/transformer-typescript-tsc": "~2.12.0",
"@parcel/transformer-webmanifest": "~2.12.0",
"@types/lodash": "^4.17.5",
"@types/node": "^18.19.39",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"parcel": "~2.12.0",
"prettier": "^3.3.2",
"@parcel/config-default": "~2.16.1",
"@parcel/packager-raw-url": "~2.16.1",
"@parcel/transformer-typescript-tsc": "~2.16.1",
"@parcel/transformer-webmanifest": "~2.16.1",
"@types/lodash": "^4.17.21",
"@types/node": "^22.19.1",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
"parcel": "~2.16.1",
"prettier": "^3.7.3",
"process": "^0.11.10",
"typescript": "~5.5.2",
"workbox-cli": "^7.1.0"
"typescript": "~5.9.3",
"workbox-cli": "^7.4.0"
},
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"@swc/core",
"lmdb",
"msgpackr-extract"
]
},
"alias": {
"react": "preact/compat",
"react-dom": "preact/compat",
"react/jsx-runtime": "preact/jsx-runtime"
},
"@parcel/resolver-default": {
"packageExports": true
},
"prettier": {
"singleQuote": true,
Expand Down
Loading