-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: migrate to pnpm, esbuild, biome and node:test * ci: add names * chore: format GA workflows with prettier * build: add watch feature * build: update npm scripts * build: use esbuild to build json.ts * fix: remove incorrect calls of svgToDataURL * chore: add blank lines to build.ts#main() * build: validate result of require("*.json.cjs") * chore: update watch.ts * build: update build script * chore: migrate from lint-staged and husky to lefthook * fix: open watch page only once * chore: update build.ts * chore: update biome.json * chore: upgrade packages * ci: upload build artifacts
- Loading branch information
Showing
183 changed files
with
23,310 additions
and
28,061 deletions.
There are no files selected for viewing
File renamed without changes.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,69 @@ | ||
name: check | ||
name: Check | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- website/** | ||
pull_request: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- website/** | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: yarn | ||
- run: yarn install --immutable | ||
- run: yarn lint | ||
- run: yarn test | ||
- run: yarn build-all | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Check | ||
run: pnpm check | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
- name: Build | ||
run: | | ||
pnpm build | ||
pnpm build --browser firefox | ||
pnpm build --browser safari | ||
env: | ||
DROPBOX_API_KEY: ${{ secrets.DROPBOX_API_KEY }} | ||
DROPBOX_API_SECRET: ${{ secrets.DROPBOX_API_SECRET }} | ||
GOOGLE_DRIVE_API_KEY: ${{ secrets.GOOGLE_DRIVE_API_KEY }} | ||
GOOGLE_DRIVE_API_SECRET: ${{ secrets.GOOGLE_DRIVE_API_SECRET }} | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: "[Website] Get changed files" | ||
id: website-changed-files | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files: website/** | ||
|
||
- name: "[Website] Check" | ||
if: steps.website-changed-files.outputs.any_changed == 'true' | ||
run: pnpm check | ||
working-directory: website | ||
|
||
- name: "[Website] Build" | ||
if: steps.website-changed-files.outputs.any_changed == 'true' | ||
run: pnpm build | ||
working-directory: website |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: "[Website] Deploy" | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
pages: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- website/** | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm build | ||
working-directory: website | ||
|
||
- name: Upload | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: website/build | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
steps: | ||
- name: Deploy | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} |
Oops, something went wrong.