Skip to content

Commit 56d2232

Browse files
authored
Merge pull request #55 from ESMValGroup/gh-action
Use GitHub action workflow to check Markdown
2 parents 1593701 + a50aac9 commit 56d2232

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Jekyll site CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Setup Ruby
13+
uses: ruby/[email protected]
14+
with:
15+
ruby-version: 2.7
16+
- name: Cache Ruby deps
17+
uses: actions/cache@v2
18+
with:
19+
path: vendor/bundle
20+
key: ruby-deps-${{ hashFiles('**/Gemfile.lock') }}
21+
restore-keys: |
22+
ruby-deps-
23+
- name: Ruby deps
24+
run: gem install json kramdown jekyll bundler
25+
- name: Setup Python
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: '3.x'
29+
- name: Python deps
30+
run: pip install pyyaml
31+
- name: Nokogiri deps
32+
run: sudo apt install -y pkg-config libxml2-dev libxslt-dev
33+
- name: Site deps
34+
run: bundle install
35+
- name: Build site
36+
run: bundle exec jekyll build
37+
- name: Check all lessons
38+
run: make lesson-check-all

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ lesson-check : lesson-fixme
132132

133133
## * lesson-check-all : validate lesson Markdown, checking line lengths and trailing whitespace
134134
lesson-check-all :
135-
@${PYTHON} bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md -l -w --permissive
135+
@${PYTHON} bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md -l -w
136136

137137
## * unittest : run unit tests on checking tools
138138
unittest :

0 commit comments

Comments
 (0)