feat: ci/cd
CI / 🔍 Lint & Type Check (push) Successful in 1m45s
CI / 🐳 Build & Push Image (push) Successful in 35s

This commit is contained in:
2026-07-10 21:59:07 +02:00
parent cf7f68cff7
commit 98ed11a776
6 changed files with 216 additions and 4 deletions
+45
View File
@@ -0,0 +1,45 @@
name: CD
on:
workflow_run:
workflows:
- CI
branches:
- main
types:
- completed
jobs:
deploy:
name: Déploiement production
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Configuration SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" \
> ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan \
-H "${{ secrets.DEPLOY_HOST }}" \
>> ~/.ssh/known_hosts
- name: 🚀 Deploy Docker
run: |
ssh \
-i ~/.ssh/id_ed25519 \
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} << 'EOF'
set -e
echo "Projet"
cd /data/docker/landing-web
echo "Pull nouvelle image"
docker compose pull
echo "Redémarrage"
docker compose up -d
EOF
+65
View File
@@ -0,0 +1,65 @@
name: CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
jobs:
lint:
name: 🔍 Lint & Type Check
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 🟢 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: 📦 Cache node_modules
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-
- name: 📥 Install dependencies
run: npm ci
- name: 🔍 Lint
run: npm run lint
docker:
name: 🐳 Build & Push Image
needs: lint
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 🔐 Login Registry Gitea
run: |
docker login git.leonmorival.xyz \
-u "${{ secrets.REGISTRY_USER }}" \
-p "${{ secrets.REGISTRY_PASSWORD }}"
- name: 🏗️ Build image
run: |
docker build \
-t git.leonmorival.xyz/leonm/landing-server:latest \
-t git.leonmorival.xyz/leonm/landing-server:${{ github.sha }} \
.
- name: 📤 Push image
run: |
docker push git.leonmorival.xyz/leonm/landing-server:latest
docker push git.leonmorival.xyz/leonm/landing-server:${{ github.sha }}
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/landing-server.iml" filepath="$PROJECT_DIR$/.idea/landing-server.iml" />
</modules>
</component>
</project>
+63 -4
View File
@@ -82,6 +82,11 @@ svg {
}
.stellar-page::before {
--star-opacity-high: 1;
--star-opacity-low: 0.68;
--star-opacity-mid: 0.78;
inset: -260px -160px;
background-image:
radial-gradient(circle, rgb(255 255 255 / 90%) 1px, transparent 1.5px),
radial-gradient(circle, rgb(0 231 255 / 65%) 1px, transparent 1.5px),
@@ -94,14 +99,22 @@ svg {
86px 86px,
142px 142px,
230px 230px;
animation: star-drift 120s linear infinite;
opacity: 0.82;
animation:
star-drift 105s linear infinite,
star-twinkle 5.6s ease-in-out infinite alternate;
will-change: transform, opacity, filter;
}
.stellar-page::after {
background:
radial-gradient(circle, rgb(255 255 255 / 70%) 1px, transparent 1.6px) 12px 22px / 166px 166px,
radial-gradient(circle, rgb(255 213 74 / 38%) 1px, transparent 1.8px) 72px 108px / 270px 270px,
linear-gradient(180deg, transparent 0%, rgb(0 231 255 / 6%) 58%, rgb(51 232 121 / 10%) 100%),
radial-gradient(ellipse at 30% 80%, rgb(139 77 255 / 18%), transparent 38%),
radial-gradient(ellipse at 80% 70%, rgb(0 231 255 / 13%), transparent 32%);
animation: star-glow 12s ease-in-out infinite alternate;
will-change: opacity;
}
.home-shell {
@@ -510,13 +523,21 @@ svg {
}
.astroneer-hero::before {
--star-opacity-high: 0.66;
--star-opacity-low: 0.42;
--star-opacity-mid: 0.5;
position: absolute;
inset: 0;
inset: -180px;
background:
radial-gradient(circle, rgb(255 255 255 / 80%) 1px, transparent 1.5px) 0 0 / 96px 96px,
radial-gradient(circle, rgb(109 244 255 / 65%) 1px, transparent 1.5px) 44px 18px / 148px 148px;
content: "";
opacity: 0.55;
animation:
astroneer-star-drift 92s linear infinite,
star-twinkle 6.5s ease-in-out infinite alternate;
will-change: transform, opacity, filter;
}
.astroneer-hero::after {
@@ -1079,11 +1100,49 @@ h2.pixel-heading {
@keyframes star-drift {
from {
transform: translateY(0);
transform: translate3d(0, 0, 0);
}
to {
transform: translateY(-220px);
transform: translate3d(-120px, -220px, 0);
}
}
@keyframes astroneer-star-drift {
from {
transform: translate3d(0, 0, 0);
}
to {
transform: translate3d(-90px, -180px, 0);
}
}
@keyframes star-twinkle {
0%,
100% {
filter: brightness(0.92);
opacity: var(--star-opacity-low, 0.68);
}
45% {
filter: brightness(1.28);
opacity: var(--star-opacity-high, 1);
}
72% {
filter: brightness(1.05);
opacity: var(--star-opacity-mid, 0.78);
}
}
@keyframes star-glow {
from {
opacity: 0.78;
}
to {
opacity: 1;
}
}
+26
View File
@@ -0,0 +1,26 @@
services:
landing-server:
image: git.leonmorival.xyz/leonm/landing-server:latest
container_name: landing-server
restart: unless-stopped
env_file:
- .env
expose:
- "3000"
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:3000/ || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
networks:
- proxy
networks:
proxy:
external: true
name: proxy