Bump actions/configure-pages from 4 to 5 (#4) #8
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: deploy-book | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
concurrency: pages-main | |
steps: | |
- name: Checkout book | |
uses: actions/checkout@v4 | |
- name: Setup Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Get GitHub Pages URL | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Replace base URL | |
run: | | |
sed -i 's~baseurl: ""~baseurl: "${{ steps.pages.outputs.base_url }}"~g' _config.yml | |
- name: Build book | |
run: | | |
jupyter-book build . | |
- name: Disable Jekyll to serve static HTML | |
run: | | |
touch _build/html/.nojekyll | |
- name: Deploy book to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
clean-exclude: preview | |
folder: "_build/html" | |
force: false |