generated from osunyorg/template
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.19 KB
/
deuxfleurs.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
50
name: deuxfleurs
on:
push:
branches: [ "main" ]
jobs:
build_and_deploy:
name: Compilation du site Hugo et déploiement Deux fleurs
runs-on: ubuntu-latest
steps:
- name: Récupération des données
uses: actions/checkout@v3
with:
submodules: true
- name: Installation de Node
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'yarn'
- name: Installation des dépendances JavaScript
run: yarn install
- name: Installation de Hugo
uses: peaceiris/actions-hugo@v2.6.0
with:
hugo-version: 'latest'
extended: true
- name: Compilation du site
run: yarn osuny build
- name: Déploiement Garage
run: hugo deploy --force --maxDeletes -1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DEUXFLEURS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEUXFLEURS_SECRET }}
- name: Notification Slack en cas d'échecs
uses: ravsamhq/notify-slack-action@2.3.0
if: always()
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: ""
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}