1
0
Fork 0
forked from Deuxfleurs/site

CI: Ajout d'une task pour désindexer le site si c'est un déploiement en preprod

Pour éviter que les moteurs de recherche flag du duplicate content parce qu'on a plusieurs sites identiques en ligne
This commit is contained in:
Tixie Salander 2024-06-07 19:03:09 +02:00 committed by Tixie
parent fd276e5dc2
commit a007d29a9f

View file

@ -19,6 +19,14 @@ steps:
commands: commands:
- '[ -f static/robots.txt ] && echo "Disallow: /*" >> static/robots.txt' - '[ -f static/robots.txt ] && echo "Disallow: /*" >> static/robots.txt'
- name: disable SEO indexing (on preprod only)
when:
event: [push, pull_request]
branch: preprod
image: debian:12 # Same as previous step to not have to download 2 images, but it could be any linux
commands:
- [ -f static/robots.txt ] && echo "Disallow: /*" >> static/robots.txt
- name: upload (preprod) - name: upload (preprod)
when: when:
event: [push, pull_request] event: [push, pull_request]