From 62544a1b97e708cb3867c28bcd1ec6b084a4da47 Mon Sep 17 00:00:00 2001 From: Neeldhara Misra Date: Mon, 20 Jul 2026 15:21:48 +0530 Subject: [PATCH] Run CI checks in Dokploy build --- .forgejo/workflows/ci.yml | 41 --------------------------------------- Dockerfile | 2 +- README.md | 4 ++-- package.json | 1 + 4 files changed, 4 insertions(+), 44 deletions(-) delete mode 100644 .forgejo/workflows/ci.yml diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml deleted file mode 100644 index 40a10b9..0000000 --- a/.forgejo/workflows/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: CI - -on: - push: - branches: - - main - pull_request: - branches: - - main - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: ci-${{ forgejo.ref }} - cancel-in-progress: true - -jobs: - verify: - runs-on: ubuntu-latest - timeout-minutes: 15 - - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: npm - - - name: Install dependencies - run: npm ci - - - name: Lint - run: npm run lint - - - name: Build - run: npm run build diff --git a/Dockerfile b/Dockerfile index ff67f4c..3a4cfee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY package.json package-lock.json ./ RUN npm ci COPY . . -RUN npm run build +RUN npm run ci FROM nginx:1.27-alpine AS runtime diff --git a/README.md b/README.md index 672b6b0..a92c9dc 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,9 @@ Simply open [Lovable](https://lovable.dev/projects/5ee9d1e7-af25-47e9-ab4c-bdbca ### Forgejo and Dokploy -Pushes and pull requests targeting `main` are verified by the Forgejo Actions workflow in `.forgejo/workflows/ci.yml`. The production container is built from `Dockerfile` and serves the Vite output with NGINX, including React Router fallback handling. +The production container is built from `Dockerfile` and serves the Vite output with NGINX, including React Router fallback handling. During the image build, `npm ci` installs the locked dependencies and `npm run ci` runs lint plus the production Vite build. -Dokploy is connected to the `Websites/interactives` Forgejo repository with autodeploy enabled. A successful push to `main` triggers a fresh Dockerfile build and replaces the running service only after the image has built successfully. +Dokploy is connected to the `Websites/interactives` Forgejo repository with autodeploy enabled. A push to `main` triggers the Dockerfile CI checks and replaces the running service only after every build step succeeds. ## Can I connect a custom domain to my Lovable project? diff --git a/package.json b/package.json index 538fcb9..9ac42cd 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "dev": "vite", "build": "vite build", "build:dev": "vite build --mode development", + "ci": "npm run lint && npm run build", "lint": "eslint .", "preview": "vite preview" },