-
Notifications
You must be signed in to change notification settings - Fork 125
93 lines (88 loc) · 2.52 KB
/
ci.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CI
on:
push:
branches:
- master
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Graphviz
uses: tlylt/install-graphviz@v1
- name: Install Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- run: npm run setup
- run: npm run test
check-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Graphviz
uses: tlylt/install-graphviz@v1
- name: Install Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- run: npm run setup
- run: npm run build:web
- name: Build MarkBind docs (UG + DG)
run: npm run build:docs
- name: Check build log
run: |
log_file="docs/_markbind/logs/markbind-$(date +'%Y-%m-%d').log"
pattern="^[0-9T:.Z-]+ - (warn|error):"
if grep -q -E "$pattern" "$log_file"; then
printf "The following issues were found when building the documentation:\n"
grep -E "$pattern" "$log_file"
exit 1
fi
deploy-docs:
needs: test
# disabled on forks
if: github.event_name == 'push' && github.repository == 'MarkBind/markbind'
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Graphviz
uses: tlylt/install-graphviz@v1
- name: Install Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- run: npm run setup
- name: Deploy DG on any commit to master, to markbind.org/devdocs
run: >-
npm run build:web &&
npm run build:dg &&
npm run deploy:dg
- name: Deploy UG on release, to markbind.org
if: github.ref_type == 'tag'
run: >-
npm run build:ug &&
npm run deploy:ug