Skip to content

Add pre-commit to run codespell and other tools #484

Add pre-commit to run codespell and other tools

Add pre-commit to run codespell and other tools #484

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Nikola
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
nikola_build:
runs-on: ubuntu-latest
name: 'Build pages'
steps:
- name: Check out
uses: actions/checkout@v4
- name: Check valid checksums
shell: bash
run: python3 check_checksums.py
- name: Look for typos with codespell
shell: bash
run: |
pip install --user codespell[toml]
codespell --toml=pyproject.toml
- name: Build docs
shell: bash
run: |
sudo apt install virtualenv
make build
- name: Deploy
if: github.ref == 'refs/heads/main'
shell: bash
run: |
# reuse the venv
venv_nikola/bin/python -m pip install ghp-import
venv_nikola/bin/ghp-import -m"Automatic push by ghp-import" -f -p -r origin -b gh-pages --cname=pypy.org public
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/[email protected]