This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[refactor] simplify Souce Code based on Web Utility, KoAJAX, MobX & P…
…arcel [migrate] replace NPM & Travis CI with PNPM & GitHub actions [optimize] upgrade Upstream packages & ReadMe document [fix] some detail bugs
- Loading branch information
Showing
30 changed files
with
9,363 additions
and
607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: CI & CD | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
Build-and-Deploy: | ||
runs-on: ubuntu-latest | ||
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: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
if: ${{ !env.VERCEL_TOKEN || !env.VERCEL_ORG_ID || !env.VERCEL_PROJECT_ID }} | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
- name: Install Dependencies | ||
if: ${{ !env.VERCEL_TOKEN || !env.VERCEL_ORG_ID || !env.VERCEL_PROJECT_ID }} | ||
run: pnpm i --frozen-lockfile | ||
|
||
- 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 }} | ||
with: | ||
publish_dir: ./dist | ||
personal_token: ${{ secrets.GITHUB_TOKEN }} | ||
force_orphan: true | ||
|
||
- name: Deploy to Vercel | ||
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 | ||
vercel-args: --prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Pull Request | ||
on: | ||
push: | ||
branches-ignore: | ||
- 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 | ||
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }} | ||
|
||
- name: Deploy to Vercel | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
|
||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
|
||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
registry=https://registry.npm.taobao.org | ||
auto-install-peers = false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.