4/14/2023 0 Comments Github pagesIf you want to deploy your site to GitHub Pages at a User and Organization repository (. # Push the book's HTML to github-pages - name : GitHub Pages action uses : with : github_token : $ publish_dir. # paths: # - some-subfolder/** # This job installs dependencies, builds the book, and pushes it to `gh-pages` jobs : deploy-book : runs-on : ubuntu-latest steps : - uses : # Install dependencies - name : Set up Python 3.8 uses : with : python-version : 3.8 - name : Install dependencies run : | pip install -r requirements.txt # Build the book - name : Build the book run : | jupyter-book build. Name : deploy-book # Only run this when the master branch changes on : push : branches : - master # If your git repository has the Jupyter Book within some-subfolder next to # unrelated files, you can make this run only if a file within that specific # folder has been modified. To use ghp-import to host your book online with GitHub Pages follow the steps below: The gh-pages branch will be created and populated automatically for you by ghp-import. Ghp-import works by copying all of the contents of your built book (i.e., the _build/html folder) to a branch of your repository called gh-pages, and pushes it to GitHub. ghp-import is a lightweight Python package that makes it easy to push HTML content to a GitHub repository. The easiest way to use GitHub Pages with your built HTML is to use the ghp-import package. (Option 2) Automatically push your build files with ghp-import # Push your changes to GitHub, and configure it to start hosting your documentation. This tells GitHub Pages to treat your files as a “static HTML website”. Note that copying all of your book’s build files into the same branch as your source files will cause your repository to become very large over time, especially if you have many images in your book.Ĭopy the contents of _build/html directory into docs (or your other branch).Īdd a file called. The Jupyter Book toolchain and components How Jupyter Book and Sphinx relate to one another Launch into interactive computing interfaces Store code outputs and insert into content How headers and sections map onto to book structure
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |