diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index c8c5ec9..0e88799 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -9,20 +9,14 @@ jobs: deploy: name: Build and Deploy to Production runs-on: docker + container: + image: forgejo-ci-node:latest steps: - name: Checkout code run: | git clone --depth 1 --branch main https://forge.studio-variable.com/${{ github.repository }}.git . ls -la - - name: Setup Node.js - run: | - apt-get update -qq && apt-get install -y -qq curl - curl -fsSL https://deb.nodesource.com/setup_20.x | bash - - apt-get install -y -qq nodejs - node --version - npm --version - - name: Install dependencies run: | npm ci @@ -44,7 +38,6 @@ jobs: PASSWORD: ${{ secrets.PASSWORD }} PRODUCTION_HOST: ${{ secrets.PRODUCTION_HOST }} run: | - apt-get install -y -qq lftp cd dist lftp -c " set ftp:ssl-allow no; diff --git a/Dockerfile.ci b/Dockerfile.ci new file mode 100644 index 0000000..6743416 --- /dev/null +++ b/Dockerfile.ci @@ -0,0 +1,12 @@ +# Image Docker pour CI/CD Forgejo - Projets Node.js +# À placer dans ~/docker-images/Dockerfile.ci-node sur le VPS +FROM node:20-slim + +# Install required tools for CI/CD +RUN apt-get update && apt-get install -y \ + lftp \ + git \ + && rm -rf /var/lib/apt/lists/* + +# Set working directory +WORKDIR /workspace diff --git a/vite.config.js b/vite.config.js index 4e0093c..3611bf3 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,5 +1,5 @@ -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; // https://vite.dev/config/ export default defineConfig({ @@ -16,11 +16,14 @@ export default defineConfig({ assetFileNames: (assetInfo) => { // Le CSS principal doit s'appeler index.css pour correspondre à header.php if (assetInfo.name && assetInfo.name.endsWith('.css')) { - return 'index.css' + return 'index.css'; } - return '[name].[ext]' - } - } - } - } -}) + return '[name].[ext]'; + }, + }, + }, + build: { + minify: false, + }, + }, +});