Skip to content

Commit ecff2fc

Browse files
authored
Remove pre-commit hook and build docs and examples in GH actions (#141)
* remove precommit hook since we have gh actions * fully remove precommit hook * better placement for test * remove test * add examples workflow * add glob pattern for committed files * set ceiling for jinja as recent release does not play nicely with mkdocs * unpin jinja and set floor for mkdocs * pin mkdocs * change checklist and examples as test * revert test
1 parent af69d34 commit ecff2fc

File tree

4 files changed

+32
-21
lines changed

4 files changed

+32
-21
lines changed

.github/workflows/examples.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: examples
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
examples:
9+
name: Build and commit examples
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Python 3.8
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.8
19+
20+
- name: Build examples and docs
21+
run: |
22+
make examples
23+
make docs
24+
25+
- name: Commit changed files from build
26+
uses: stefanzweifel/git-auto-commit-action@v4
27+
with:
28+
commit_message: Add rendered files from build
29+
file_pattern: examples/* docs/docs/*.md README.md

.precommithook

-13
This file was deleted.

Makefile

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
.PHONY: register_hook reqs examples docs test render_markdown
2-
3-
# adds git precommit hook
4-
register_hook:
5-
cp .precommithook .git/hooks/pre-commit
6-
chmod +x .git/hooks/pre-commit
1+
.PHONY: reqs examples docs test render_markdown
72

83
## Install python dependencies
9-
reqs: register_hook
4+
reqs:
105
pip install -r dev-requirements.txt
116

127
examples: reqs

dev-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
flake8
66
black
77
jinja2
8-
mkdocs==1.2.3
8+
mkdocs==1.2.4
99
git+https://github.com/drivendataorg/mkdocs-alabaster.git#egg=mkdocs-alabaster
1010
pytest==3.6.4
1111
pymdown-extensions==5.0

0 commit comments

Comments
 (0)