Merge pull request #7 from follen99/light-mode #11
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: CI/CD & Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| # 1. Esegue i test (Buona pratica) | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -e '.[dev]' | |
| - name: Run tests | |
| run: pytest | |
| # 2. Costruisce e Pubblica la Documentazione | |
| deploy-docs: | |
| needs: test # Pubblica solo se i test passano | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install doc dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -e '.[docs]' | |
| - name: Deploy to GitHub Pages | |
| run: mkdocs gh-deploy --force |