feat: add build hash to sidebar footer and Gitea CI/CD deploy workflow
Some checks failed
Deploy to VPS / deploy (push) Has been cancelled

- Inject git commit short hash at build time via NEXT_PUBLIC_BUILD_HASH
- Display build hash in sidebar footer for version tracking
- Add Gitea Actions workflow to auto-deploy on push to master (SSH → pull → rebuild)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
CTO (LegalAI)
2026-04-09 20:58:50 +00:00
parent 2509b907ae
commit 6f80cadbd4
3 changed files with 39 additions and 0 deletions

View File

@@ -1,8 +1,20 @@
import type { NextConfig } from "next";
import { execSync } from "child_process";
const commitHash = (() => {
try {
return execSync("git rev-parse --short HEAD").toString().trim();
} catch {
return "dev";
}
})();
const nextConfig: NextConfig = {
output: "standalone",
serverExternalPackages: ["pdf-parse", "drizzle-orm", "pg"],
env: {
NEXT_PUBLIC_BUILD_HASH: commitHash,
},
};
export default nextConfig;