Repository navigation
Expand file tree
/
Copy pathmise.toml
More file actions
101 lines (84 loc) · 2.95 KB
/
Copy pathmise.toml
File metadata and controls
101 lines (84 loc) · 2.95 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[tools]
gum = "latest"
hugo-extended = "0.162"
"npm:sequoia-cli" = "latest"
[env]
HUGO_OPTIONS = "--printI18nWarnings --printPathWarnings --cleanDestinationDir --logLevel debug --disableFastRender"
ATP_IDENTIFIER = "codeka.io"
PDS_URL = "https://eurosky.social"
[tasks]
[tasks.clean]
description = "Clean up Hugo build directories"
run = "rm -rf public/ resources/"
[tasks.fetch-views-data]
description = 'Fetch data from plausible'
dir = "scripts"
tools.go = "1.26"
run = "go run plausible_fetch.go -site codeka.io -range all -out ../data/plausible-stats/visits.json"
[tasks.fetch-bluesky-stats]
description = 'Fetch data from bluesky'
dir = "scripts"
tools.go = "1.26"
run = "go mod tidy && go run bluesky_stats.go"
[tasks.build]
description = "Build le site avec Hugo"
depends = ['fetch-views-data']
run = "hugo build hugo --gc --minify --cleanDestinationDir --destination public"
depends_post = ["post-build"]
[tasks.post-build]
description = "Post build hooks"
depends_post = ["precompress"]
[tasks.precompress]
description = "Precompress static resources"
run = '''
COMPRESSREGEX=".*(html|css|js|xml|ico|svg|md|pdf)$"
find public/ -type f -regextype egrep -regex $COMPRESSREGEX | xargs zstd --keep --force -19
find public/ -type f -regextype egrep -regex $COMPRESSREGEX | xargs gzip --keep --force --best
'''
[tasks.serve]
description = "Lance le serveur de développement Hugo"
run = "hugo server --openBrowser $HUGO_OPTIONS"
[tasks.draft]
description = "Serve Hugo en incluant les brouillons et futures publications"
run = "hugo server --openBrowser $HUGO_OPTIONS --buildDrafts --buildFuture"
[tasks.nbsp]
description = "Insère des espaces insécables avant ;?:! dans les posts"
shell = "zsh -c"
run = '''
sed -i '/^---$/,/^---$/b;/^```$/,/^```$/b;s/ \([;?:!]\)/\ \1/g' content/posts/**/*.md
'''
[tasks."new-tech-watch-post"]
description = "Crée un nouveau post de veille"
usage = '''
arg "<date>" help="Date de publication du post"
'''
run = "hugo new content posts/${usage_date}-mi-veille -k veille"
[tasks."clever:preview"]
description = "Déploie une preview Clever Cloud et ouvre l'URL"
tools.node = "latest"
tools."npm:clever-tools" = "latest"
depends = ['fetch-views-data']
run = "clever deploy --alias preview --force && clever open --alias preview"
[tasks."clever:deploy"]
description = "Déploie sur l'alias Clever Cloud de production"
tools.node = "latest"
tools."npm:clever-tools" = "latest"
run = '''
clever link $PROD_APP_ID --alias codeka.io || true
clever deploy --alias codeka.io
'''
[tasks."backstop:test"]
description = "Exécute les tests visual regression avec BackstopJS"
tools."npm:backstopjs" = "latest"
tools.node = "22"
run = "backstop test"
[tasks."backstop:reference"]
description = "Prend les captures d'écran de référence"
tools."npm:backstopjs" = "latest"
tools.node = "22"
run = "backstop reference"
[tasks."backstop:approve"]
description = "Valide les tests visual regression"
tools."npm:backstopjs" = "latest"
tools.node = "22"
run = "backstop approve"