diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 6fef1f75..20a746ed 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -10,6 +10,29 @@ jobs: if: startsWith(gitea.ref_name, 'v') runs-on: shell steps: + - name: Build and deploy + env: + VERSION: ${{ gitea.ref_name }} + run: | + set -e + exec 2>&1 + WORK="$(mktemp -d /var/tmp/epicnext-deploy.XXXXXX)" + cleanup() { rm -rf "${WORK}"; } + trap cleanup EXIT + echo "=== Deploying ${VERSION} ===" + git clone --depth 50 \ + /docker/gitea/gitea/git/repositories/remco/epicnext-cms.git \ + "${WORK}" + cd "${WORK}" + git checkout "${VERSION}" + export NODE_ENV=production + export SKIP_ENV_VALIDATION=1 + pnpm install --frozen-lockfile + pnpm prisma:generate + pnpm build + pm2 restart next --update-env + pm2 save + echo "=== Deploy complete ===" - name: Create Release env: VERSION: ${{ gitea.ref_name }} diff --git a/vitest.config.ts b/vitest.config.ts index 86b859b6..533fed86 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -24,10 +24,10 @@ export default defineConfig({ provider: "v8", reporter: ["text", "lcov", "html"], thresholds: { - statements: 5, - branches: 3, - functions: 4, - lines: 5, + statements: 100, + branches: 100, + functions: 100, + lines: 100, }, include: ["src/**/*.{ts,tsx}"], exclude: [