ci: vérification sur toutes les branches, déploiement réservé à main
Portfolio / build-deploy (push) Successful in 1m27s
Portfolio / build-deploy (push) Successful in 1m27s
This commit is contained in:
1 parent
04f3535cad
commit
2bf0dcf6ff
1 file changed
+6
-2
@@ -1,10 +1,13 @@
|
||||
# Push sur main → vérification, build, audit Lighthouse (scores >= 90), déploiement.
|
||||
# Push sur n'importe quelle branche → vérification, build, audit Lighthouse (scores >= 90).
|
||||
# Sur main uniquement → déploiement.
|
||||
# Runner : gitea-runner en mode host sur le VPS1 (label vps1), voir vps1-quadlets.
|
||||
# Attention : /deploy/portfolio est monté en écriture pour toutes les branches ;
|
||||
# seule la condition "if" ci-dessous réserve le déploiement à main.
|
||||
name: Portfolio
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
branches: ['**']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -26,6 +29,7 @@ jobs:
|
||||
run: pnpm lighthouse
|
||||
|
||||
- name: Déploiement
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
test -f dist/index.html
|
||||
rsync -a --delete dist/ /deploy/portfolio/
|
||||
Reference in new issue
Block a user