-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTaskfile.yaml
46 lines (39 loc) · 1003 Bytes
/
Taskfile.yaml
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
# https://taskfile.dev
version: "3"
vars:
HUGO_VERSION: "0.133.0"
HUGO_RELEASES: https://github.com/gohugoio/hugo/releases/download/
tasks:
install:hugo:
status:
- test -f bin/hugo
vars:
ARCH: '{{if eq OS "darwin"}}universal{{else}}{{ARCH}}{{end}}'
cmds:
- mkdir -p bin
- wget {{.HUGO_RELEASES}}v{{.HUGO_VERSION}}/hugo_extended_{{.HUGO_VERSION}}_{{OS}}-{{.ARCH}}.tar.gz
- defer: rm hugo_*.tar.gz
- tar -xvf hugo_*.tar.gz -C bin
- ./bin/hugo version
install:theme:
status:
- test -d themes/hugo-book
cmds:
- git clone https://github.com/alex-shpak/hugo-book themes/hugo-book --depth=1
install:
desc: "Install all dependencies"
cmds:
- task: install:hugo
- task: install:theme
serve:
desc: "Run dev server"
deps:
- install
cmds:
- ./bin/hugo server {{.CLI_ARGS}}
build:
desc: "Run dev server"
deps:
- install
cmds:
- ./bin/hugo {{.CLI_ARGS}}