updates #298
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: deploy-book | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy-book: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1️⃣ Checkout the repository | |
| - uses: actions/checkout@v2 | |
| # 2️⃣ Set up Python 3.11 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.11 | |
| # 3️⃣ Install system dependencies (needed by PyTables) | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libhdf5-dev build-essential python3-dev | |
| # 4️⃣ Install Python dependencies | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel setuptools | |
| pip install -r requirements.txt | |
| # 5️⃣ Build the Jupyter Book (using python -m to ensure it works in venv) | |
| - name: Build the Jupyter Book | |
| run: | | |
| python -m jupyter_book build --config _config.yml --toc _toc.yml . | |
| # 6️⃣ Deploy to GitHub Pages | |
| - name: GitHub Pages action | |
| uses: peaceiris/actions-gh-pages@v3.6.1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./_build/html |