phase 1: add Gemfile pinned to github-pages for reproducible local builds #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: pre-commit | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: Install image tooling (jpegoptim, oxipng, svgo) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y jpegoptim | |
| cargo install oxipng --locked | |
| npm install -g svgo | |
| - name: Run pre-commit | |
| # Pre-commit's default behavior: any hook that modifies files exits | |
| # nonzero. That fails this job and prints the offending files, so | |
| # contributors who skipped local install see a clear "run pre-commit | |
| # run --all-files locally and commit the result" message. | |
| run: pre-commit run --show-diff-on-failure --all-files |