add image docker
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 16s
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 16s
This commit is contained in:
parent
a7918a35e2
commit
3cc4da63fb
3 changed files with 26 additions and 18 deletions
|
|
@ -9,20 +9,14 @@ jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Build and Deploy to Production
|
name: Build and Deploy to Production
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: forgejo-ci-node:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 --branch main https://forge.studio-variable.com/${{ github.repository }}.git .
|
git clone --depth 1 --branch main https://forge.studio-variable.com/${{ github.repository }}.git .
|
||||||
ls -la
|
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
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
|
|
@ -44,7 +38,6 @@ jobs:
|
||||||
PASSWORD: ${{ secrets.PASSWORD }}
|
PASSWORD: ${{ secrets.PASSWORD }}
|
||||||
PRODUCTION_HOST: ${{ secrets.PRODUCTION_HOST }}
|
PRODUCTION_HOST: ${{ secrets.PRODUCTION_HOST }}
|
||||||
run: |
|
run: |
|
||||||
apt-get install -y -qq lftp
|
|
||||||
cd dist
|
cd dist
|
||||||
lftp -c "
|
lftp -c "
|
||||||
set ftp:ssl-allow no;
|
set ftp:ssl-allow no;
|
||||||
|
|
|
||||||
12
Dockerfile.ci
Normal file
12
Dockerfile.ci
Normal file
|
|
@ -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
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue';
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|
@ -16,11 +16,14 @@ export default defineConfig({
|
||||||
assetFileNames: (assetInfo) => {
|
assetFileNames: (assetInfo) => {
|
||||||
// Le CSS principal doit s'appeler index.css pour correspondre à header.php
|
// Le CSS principal doit s'appeler index.css pour correspondre à header.php
|
||||||
if (assetInfo.name && assetInfo.name.endsWith('.css')) {
|
if (assetInfo.name && assetInfo.name.endsWith('.css')) {
|
||||||
return 'index.css'
|
return 'index.css';
|
||||||
}
|
}
|
||||||
return '[name].[ext]'
|
return '[name].[ext]';
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
build: {
|
||||||
})
|
minify: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue