factorise when

This commit is contained in:
Aeddis 2024-12-10 22:41:45 +01:00
parent c17cc7d4d4
commit 9493de35bb

View file

@ -3,6 +3,8 @@ when:
event:
- push
- pull_request
branch: preprod
steps:
- name: HTML syntax check
@ -18,15 +20,11 @@ steps:
- tidy -q -e --drop-empty-elements no static/index.html
- name: disable SEO indexing (on preprod only)
when:
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:
branch: preprod
image: plugins/s3
settings:
bucket: preprod-site