No description
  • Astro 94.9%
  • TypeScript 4.6%
  • JavaScript 0.3%
  • Dockerfile 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
SimbaFs 378a35bb54
All checks were successful
Build and publish static website / build-and-publish (push) Successful in 15s
Publish tools to Garage so the static site no longer needs a Kubernetes image
2026-10-23 17:45:23 +08:00
.forgejo/workflows Publish tools to Garage so the static site no longer needs a Kubernetes image 2026-10-23 17:45:23 +08:00
.vscode Initial commit from Astro 2026-03-03 20:48:19 +08:00
docs Publish tools to Garage so the static site no longer needs a Kubernetes image 2026-10-23 17:45:23 +08:00
public feat: add money visualizer tool for Android database backup 2026-03-19 20:13:26 +08:00
src Make tools static for backend-free deployment 2026-10-23 16:25:01 +08:00
.dockerignore migrate to Docker 2026-09-26 15:16:27 +08:00
.gitignore Initial commit from Astro 2026-03-03 20:48:19 +08:00
AGENTS.md docs: update AGENTS.md with tool-specific guidelines 2026-03-03 21:03:28 +08:00
astro.config.mjs Make tools static for backend-free deployment 2026-10-23 16:25:01 +08:00
compose.yaml Make tools static for backend-free deployment 2026-10-23 16:25:01 +08:00
Dockerfile Make tools static for backend-free deployment 2026-10-23 16:25:01 +08:00
nginx.conf Make tools static for backend-free deployment 2026-10-23 16:25:01 +08:00
package.json Make tools static for backend-free deployment 2026-10-23 16:25:01 +08:00
pnpm-lock.yaml Make tools static for backend-free deployment 2026-10-23 16:25:01 +08:00
pnpm-workspace.yaml update pnpm workspace 2026-09-26 13:53:48 +08:00
README.md Publish tools to Garage so the static site no longer needs a Kubernetes image 2026-10-23 17:45:23 +08:00
tsconfig.json Initial commit from Astro 2026-03-03 20:48:19 +08:00

Tools

這是一組以 Astro 建立的純前端工具。網站建置為靜態檔案,不需要應用程式後端、資料庫、Cookie 或 local storage。一般工具的狀態透過 URL 保存;GitHub token 只保存在目前頁面的記憶體中。

本機開發

pnpm install
pnpm dev

Docker 部署

Dockerfile 會建置靜態網站,並使用 Nginx 提供檔案。使用 Compose 部署:

docker compose up -d --build

開啟 http://localhost:4321。停止服務:

docker compose down

Repos 工具在瀏覽器直接呼叫 GitHub API。使用時請建立僅限需要管理的 repositories、設定短效期、具備 repository Administration: read and write 權限的 fine-grained personal access token。Token 不會寫入網址或瀏覽器儲存空間,重新整理後須再次輸入。 正式環境必須透過 HTTPS 提供網站;若使用反向代理,請在代理層終止 TLS。Docker 映像會加上防止嵌入頁面與停用內容類型猜測的標頭;若直接部署靜態檔案,請在該檔案伺服器設定相同標頭。

Forgejo Actions

.forgejo/workflows/build-image.yaml 在 main push 時,使用 docker-build runner 檢查與建置網站,再透過 runner 上的 AWS CLI 將 dist/ 發布到 s3://tools.1li.tw。在此 repository 的 Actions secrets 設定 AWS_ACCESS_KEY_ID 與 AWS_SECRET_ACCESS_KEY,使用只授權該 bucket 的 Garage 金鑰。不要把金鑰寫進程式碼或傳到對話中。

Workflow 使用 https://s3.1li.tw 作為 S3 API endpoint;公開網站由 https://tools.1li.tw 提供。發布順序、快取與切換檢查詳見 Garage 部署文件。

直接部署靜態網站

pnpm install --frozen-lockfile
pnpm run build

將 dist/ 放到任一靜態檔案伺服器即可。正式站使用 Garage website endpoint;TLS 與安全標頭由入口層處理。

常用指令

指令 用途
pnpm dev 啟動開發伺服器
pnpm build 建立靜態網站
pnpm preview 預覽建置結果
pnpm astro check TypeScript/Astro 檢查