Feat: add doc build github action #1466
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: [push, pull_request] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12.11" | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libudunits2-dev | |
| - name: Install pre-commit | |
| run: | | |
| pip install pre-commit | |
| pip install pydantic | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| version: 2.2.1 | |
| - name: Clear Poetry Cache | |
| run: | | |
| poetry cache clear pypi --all | |
| - name: Install project - needed for custom poetry hook | |
| run: poetry install --no-interaction | |
| - name: Run pre-commit | |
| run: poetry run pre-commit run --all-files # uncomment this if needed to debug ||true | |
| # useful for debugging poetry problems | |
| # - name: Show poetry.lock diff | |
| # run: | | |
| # git diff poetry.lock || true |