aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTixie <contact@tixie.name>2024-06-07 19:03:09 +0200
committerTixie <contact@tixie.name>2024-06-07 19:13:39 +0200
commit9a230c545dfde7e2253558f18a1811931001b258 (patch)
tree86f26c2a53c2e48fc989ebbdaef4ffaf3ea7d3e0
parent8619254c73c77ec2b8721670b859dd86f549b7b8 (diff)
downloadsite-9a230c545dfde7e2253558f18a1811931001b258.tar.gz
site-9a230c545dfde7e2253558f18a1811931001b258.zip
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
-rw-r--r--.woodpecker.yaml8
1 files changed, 8 insertions, 0 deletions
diff --git a/.woodpecker.yaml b/.woodpecker.yaml
index d1d955b..76c1c0e 100644
--- a/.woodpecker.yaml
+++ b/.woodpecker.yaml
@@ -11,6 +11,14 @@ steps:
- DEBIAN_FRONTEND=noninteractive apt install -qq -y ./tidy-5.8.0-Linux-64bit.deb
- tidy -q -e static/index.html
+ - 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)
when:
event: [push, pull_request]