updating chapter on squashingscaler #7
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: 'publish_book' | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| jobs: | |
| deploy-gh-pages: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: prefix-dev/setup-pixi@v0.8.10 | |
| with: | |
| pixi-version: v0.59.0 | |
| environments: doc | |
| - name: Convert Python file to notebooks for JupyterLite | |
| run: | | |
| # to create the predictions and validation curves cache | |
| pixi run -e doc convert-to-executed-notebooks | |
| # to clean the output | |
| pixi run -e doc convert-to-notebooks | |
| - name: Build the JupyterLite site | |
| run: | | |
| pixi run -e doc build-jupyterlite | |
| - name: Build and publish the book | |
| run: pixi run -e doc render | |
| - name: Copy jupyterlite site under the book directory | |
| run: | | |
| pixi run -e doc copy-jupyterlite | |
| - name: Update the main gh-page website | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./_build/html | |
| commit_message: "[ci skip] ${{ github.event.head_commit.message }}" |