-
Notifications
You must be signed in to change notification settings - Fork 22
49 lines (45 loc) · 1.74 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-18.04
steps:
- run: |
curl -sSfL https://code.travail.gouv.fr/ | grep -q "Code du travail numérique"
- name: Create the Mattermost Message
if: failure()
run: |
echo "{\"text\":\"Le site n'est pas accessible : ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}\"}" > mattermost.json
- uses: mattermost/action-mattermost-notify@master
if: failure()
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
robots:
name: Check robots.txt
runs-on: ubuntu-18.04
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"
- name: Create the Mattermost Message
if: failure()
run: |
echo "{\"text\":\"Erreur sur le robots.txt 😱😱😱😱😱😱😱😱 ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}\"}" > mattermost.json
- uses: mattermost/action-mattermost-notify@master
if: failure()
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}