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
---
version: 3

env:
  
vars:
  BENCHTIME: 4s

tasks:
  default:
    deps: [all]

  cleanbuild:
    deps: [clean, full]

  codefiles:
    desc: "Pygmentize sitebuild script"
    cmds:
      - ./venv/bin/pygmentize -O full,style=emacs,linenos=1,lineanchors=1 -f html -l python -o content/sitebuild.html sitebuild
      - ./venv/bin/pygmentize -O full,style=emacs,linenos=1,lineanchors=1 -f html -l lua -o content/filters.html pandoc/filters.lua
      - ./venv/bin/pygmentize -O full,style=emacs,linenos=1,lineanchors=1 -f html -l yaml -o content/Taskfile.yml.html Taskfile.yml

  pipremote:
    desc: "Updte Pip environment on remote server"
    cmds:
      - ssh myweb@surya.btbytes.com 'cd ~/btbytes/; ./venv/bin/pip install -r requirements.txt'
  all:
    desc: "Only build the changes"
    cmds:
      - ./venv/bin/python3 sitebuild
  full:
    desc: "Do a full build"
    cmds:
      - ./venv/bin/python3 sitebuild --full
  clean:
    desc: "Delete the old build"
    cmds:
      - rm -rf output
  publish:
    desc: "Publish the site after committing all"
    cmds:
      - git add .
      - git commit -am "adding more things"
      - git push origin master
      - git push surya master
  serve:
    desc: "start a local webserver to serve this website"
    dir: 'output'
    cmds:
      - ../venv/bin/python3 -m http.server