-
Notifications
You must be signed in to change notification settings - Fork 22
49 lines (45 loc) · 1.97 KB
/
verification-production.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Vérification de la production
on:
workflow_run:
workflows: ["🚀 Production"]
types:
- completed
workflow_dispatch:
concurrency:
cancel-in-progress: true
group: verification-production-${{ github.ref }}
jobs:
live:
name: Check if the site is live
runs-on: ubuntu-latest
steps:
- run: |
curl -sSfL https://code.travail.gouv.fr/ | grep -q "Code du travail numérique"
- uses: mattermost/action-mattermost-notify@master
if: failure()
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
TEXT: |-
Le site n'est pas accessible 😱😱😱😱😱😱😱😱 ([logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})) (cc: @max @victorz @carolinebda @martial).
robots:
name: Check robots.txt
runs-on: ubuntu-latest
steps:
- run: |
curl -sSfL https://code.travail.gouv.fr/robots.txt | grep -q "User-agent: *"
- run: |
curl -sSfL https://code.travail.gouv.fr/robots.txt | grep -q "Disallow: /assets/"
- run: |
curl -sSfL https://code.travail.gouv.fr/robots.txt | grep -q "Disallow: /images/"
- run: |
curl -sSfL https://code.travail.gouv.fr/robots.txt | grep -q "Sitemap: https://code.travail.gouv.fr/sitemap.xml"
- run: |
curl -sSfL https://code.travail.gouv.fr/sitemap.xml -o sitemap.xml && grep -q "https://code.travail.gouv.fr/" sitemap.xml
- run: |
curl -sSfLI https://code.travail.gouv.fr/sitemap.xml | grep -q "content-type: text/xml"
- uses: mattermost/action-mattermost-notify@master
if: failure()
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
TEXT: |-
Erreur sur le robots.txt ou sitemap.xml 😱😱😱😱😱😱😱😱 ([logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})) (cc: @max @victorz @carolinebda @martial).