Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add .pre-commi-hooks by @dkorzhov #106

Merged
merged 18 commits into from
Jul 28, 2021
12 changes: 12 additions & 0 deletions .github/workflows/book-with-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ on:

# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
pre-commit:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.3
with:
extra_args: --all-files

deploy-book:
runs-on: ubuntu-latest
if: failure() != true
needs: [pre-commit]
steps:
- name: Checkout branch for build
uses: actions/checkout@v2
Expand Down
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
exclude: '.github/|.pre-commit-config.yaml|.gitignore'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: check-docstring-first
- id: check-json
- id: check-xml
- id: end-of-file-fixer
- id: trailing-whitespace
args: ["--markdown-linebreak-ext=md"]