refonte: portfolio statique Astro (design moderne développeur)
Some checks failed
Deploy production / build-deploy (push) Failing after 56s
Some checks failed
Deploy production / build-deploy (push) Failing after 56s
- Remplace l'ancien Astro hybrid + admin par un site one-page statique (sortie static) - Thème clair/sombre sans flash, contenu typé (src/data/content.ts), zéro admin - Icônes simple-icons (SVG monochrome), polices auto-hébergées (RGPD) - SEO complet : canonical, Open Graph, Twitter Card, JSON-LD Person, robots.txt, sitemap.xml, image OG 1200x630 - CI Gitea de déploiement FTPS vers Plesk (.gitea/workflows/prod.yml)
This commit is contained in:
46
.gitea/workflows/prod.yml
Normal file
46
.gitea/workflows/prod.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
# Déploiement production — johanleroy.fr
|
||||
# Push sur `main` → contrôle de types → build statique Astro → mirror FTP vers Plesk.
|
||||
# Secrets requis dans Gitea (Settings → Actions → Secrets) :
|
||||
# FTP_HOST, FTP_USER, FTP_PASSWORD, FTP_TARGET_DIR (chemin docroot, ex. /httpdocs/johanleroy/public)
|
||||
name: Deploy production
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container: node:22-bullseye
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --no-audit --no-fund
|
||||
|
||||
- name: Type check
|
||||
run: npm run check
|
||||
|
||||
- name: Build static site
|
||||
run: npm run build
|
||||
|
||||
- name: Verify build output
|
||||
run: ls -la dist
|
||||
|
||||
- name: Deploy via FTPS (Plesk)
|
||||
run: |
|
||||
apt-get update && apt-get install -y lftp
|
||||
# FTPS forcé (jamais de fallback en clair) + vérification du certificat (CA système).
|
||||
# Si le déploiement échoue sur une erreur de certificat, c'est que le cert FTP ne
|
||||
# correspond pas à FTP_HOST → préférer SFTP (clé SSH) plutôt que de désactiver la vérif.
|
||||
lftp -e "
|
||||
set ftp:ssl-force true;
|
||||
set ftp:ssl-protect-data true;
|
||||
set ssl:verify-certificate yes;
|
||||
open ${{ secrets.FTP_HOST }};
|
||||
user ${{ secrets.FTP_USER }} ${{ secrets.FTP_PASSWORD }};
|
||||
mirror --reverse --delete --verbose dist/ ${{ secrets.FTP_TARGET_DIR }};
|
||||
bye
|
||||
"
|
||||
@@ -1,26 +0,0 @@
|
||||
name: Tests
|
||||
on:
|
||||
push:
|
||||
branches: [main, dev]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:22-bullseye
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --no-audit --no-fund
|
||||
|
||||
- name: Astro check (types + lint hints)
|
||||
run: npm run check
|
||||
|
||||
- name: Vitest
|
||||
run: npm test
|
||||
|
||||
- name: Astro build (vérifie que le build prod passe)
|
||||
run: npm run build
|
||||
Reference in New Issue
Block a user