diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index d1d71ec..7933477 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -5,29 +5,45 @@ on: branches: - main -# This job installs dependencies, build the book, and pushes it to `gh-pages` +env: + BASE_URL: /${{ github.event.repository.name }} + +# Set GITHUB_TOKEN permissions to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# Do NOT cancel in-progress runs (allow these production deployments to complete). +concurrency: + group: "pages" + cancel-in-progress: false jobs: - deploy-book: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - # Install dependencies + - uses: actions/checkout@v6 + - name: Setup Pages + uses: actions/configure-pages@v6 - name: Set up Python 3.14 uses: actions/setup-python@v6 with: - python-version: "3.14" - + python-version: "3.14" - name: Install dependencies run: | - pip install jupyter-book - + python -m pip install --upgrade pip + pip install jupyter-book - name: Build the book run: | - jupyter-book build notebooks - - - name: GitHub Pages action - uses: peaceiris/actions-gh-pages@v4.0.0 + cd notebooks + jupyter-book build --html + - name: Upload artifact + uses: actions/upload-pages-artifact@v5 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: notebooks/_build/html + path: "notebooks/_build/html" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/.gitignore b/.gitignore index 435cf33..36d274e 100644 --- a/.gitignore +++ b/.gitignore @@ -164,3 +164,5 @@ jobs/ # pixi environments .pixi/* !.pixi/config.toml + +notebooks/_build diff --git a/notebooks/_config.yml b/notebooks/_config.yml deleted file mode 100644 index d067da9..0000000 --- a/notebooks/_config.yml +++ /dev/null @@ -1,9 +0,0 @@ -title: Single-cell analysis repository -author: Philipp Weiler -execute: - execute_notebooks: "off" - -repository: - url: https://github.com/WeilerP/sc_analysis_template -html: - use_repository_button: true diff --git a/notebooks/_static/custom.css b/notebooks/_static/custom.css new file mode 100644 index 0000000..c21523f --- /dev/null +++ b/notebooks/_static/custom.css @@ -0,0 +1,9 @@ +/* Hide "Made with MyST" branding in navbar */ +.myst-home-link { + display: none !important; +} + +/* Hide "Made with MyST" branding in sidebar (if present) */ +.myst-made-with-myst { + display: none !important; +} diff --git a/notebooks/_toc.yml b/notebooks/_toc.yml deleted file mode 100644 index 59a7faa..0000000 --- a/notebooks/_toc.yml +++ /dev/null @@ -1,6 +0,0 @@ -format: jb-book -root: index -parts: - - caption: Template - chapters: - - file: template diff --git a/notebooks/myst.yml b/notebooks/myst.yml new file mode 100644 index 0000000..2d63d1d --- /dev/null +++ b/notebooks/myst.yml @@ -0,0 +1,23 @@ +version: 1 +project: + title: Single-cell analysis repository + # To display author(s) + # authors: + # - name: Author One + # email: author1@email.com + # affiliation: + # - Institute A + # - name: Author Two + # email: author2@email.com + # To link to GitHub repo + # github: GitHubID/REPO_NAME + toc: + - file: index.md + - title: Template notebook + children: + - file: template.ipynb +site: + options: + folders: true + style: _static/custom.css + template: book-theme diff --git a/pyproject.toml b/pyproject.toml index f093f11..52795c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,8 @@ test = [ "pytest", "pytest-cov", ] +docs = [ "jupyter-book>=1" ] +agentic = [ "jcodemunch-mcp" ] jupyter = [ "ipywidgets", "jupyterlab",