docs(#19): clarify lts strategy (#20) #71
This file contains 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: Tests and Linting | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Pre-Commit | |
run: python -m pip install pre-commit && pre-commit install | |
- name: Load cached Pre-Commit Dependencies | |
id: cached-pre-commit-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit/ | |
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Execute Pre-Commit | |
run: pre-commit run --show-diff-on-failure --color=always --all-files | |
build-page: | |
needs: validate | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- uses: pdm-project/setup-pdm@v3 | |
name: Set up PDM | |
with: | |
python-version: "3.11" | |
- name: Install App Dependencies | |
run: pdm install | |
- name: Build page | |
run: pdm run make page | |
- name: Deploy | |
if: github.ref == 'refs/heads/main' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: page/_build/html | |
clean-exclude: | | |
1 | |
lib |