Commit Graph

2 Commits

Author SHA1 Message Date
hermes
3efaf4d661 ci: switch deploy trigger from generic webhook to EasyPanel tRPC API
Some checks failed
Build & Deploy to EasyPanel / build-and-deploy (push) Has been cancelled
Lint & Test / build-check (push) Has been cancelled
Replaces the old EASYPANEL_WEBHOOK_URL flow with a direct tRPC call
to the panel, using three minimal secrets the operator fills in:

  EASYPANEL_TOKEN         - bearer token from EasyPanel profile
  EASYPANEL_PROJECT_NAME  - project name in the dashboard
  EASYPANEL_SERVICE_NAME  - service name inside that project

The endpoint (https://panelwebsite.moreminimore.com/api/trpc/services.
app.deployService) is hardcoded because the panel URL does not change.
Payload uses tRPC's wrapped-json shape: {"json":{"projectName":...,
"serviceName":...}}.

The build still runs and the dist/ artifact still uploads when any
secret is empty — only the trigger step is skipped with a warning.

Also adds docs/ci-setup.md explaining the three secrets, the service
type requirement (must be 'app' / Dockerfile-based), and a curl recipe
for testing the payload shape locally before pushing.
2026-06-09 09:47:24 +07:00
hermes
02c7b7b29b ci: add Gitea Actions workflows for build + EasyPanel deploy
Some checks failed
Build & Deploy to EasyPanel / build-and-notify (push) Has been cancelled
Lint & Test / build-check (push) Has been cancelled
Two workflows under .gitea/workflows/:

- build-and-deploy.yml: on push to source-code, install deps, run
  astro build, then POST the dist/ SHA + ref to EASYPANEL_WEBHOOK_URL
  (read from repo secret) so EasyPanel redeploys. Uploads dist/ as a
  7-day artifact as a fallback. Gracefully warns if the secret is empty
  so contributors can run the build job without breaking.

- lint.yml: lightweight build check on every push + PR so syntax /
  missing-image errors surface before the deploy workflow runs.

To enable auto-deploy:
  1. Set EASYPANEL_WEBHOOK_URL secret in Gitea repo settings
  2. Configure EasyPanel service to source from this repo + branch
     source-code, build command 'npm run build', output 'dist'
2026-06-08 23:17:43 +07:00