-
-
Notifications
You must be signed in to change notification settings - Fork 21
70 lines (66 loc) · 1.89 KB
/
build-site.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Deploy site
on:
push:
schedule:
- cron: '47 4 * * 4'
jobs:
linux1:
name: Build site
runs-on: ubuntu-latest
steps:
- name: update package database
run: sudo apt-get update
- name: install required packages
run: sudo apt-get install haskell-stack php php-curl minify yui-compressor
- name: stack update
run: stack update
- name: make bin directory
run: mkdir -p /tmp/bin
- name: install pandoc
run: stack install pandoc --resolver lts-17.8 --local-bin-path=/tmp/bin
- name: checkout code
uses: actions/[email protected]
- name: build the site
run: make
linux2:
name: Look for todos
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/[email protected]
- name: look for todos
run: "! grep -i -P '<pre\\s*>|TODO|[?]{3,}' */*.md"
linux3:
name: Look for code not highlighted
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/[email protected]
- name: look for unhighlighted code
run: "! grep -Pz '\\n\\n```\\n' */*.md"
linux4:
name: Deploy website
runs-on: ubuntu-latest
needs: [linux1, linux2, linux3]
if: github.ref == 'refs/heads/master'
steps:
- name: update package database
run: sudo apt-get update
- name: install required packages
run: sudo apt-get install haskell-stack php php-curl minify yui-compressor
- name: stack update
run: stack update
- name: make bin directory
run: mkdir -p /tmp/bin
- name: install pandoc
run: stack install pandoc --resolver lts-17.8 --local-bin-path=/tmp/bin
- name: checkout code
uses: actions/[email protected]
- name: build the site
run: make
- name: deploy site to gh-pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: out_
single-commit: true