-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,39 @@ | ||
name: Sphinx docs to gh-pages | ||
name: deploy-book | ||
|
||
# Only run this when the master branch changes | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
- main | ||
paths: | ||
- bootcamp/** | ||
|
||
# This job installs dependencies, builds the book, and pushes it to `gh-pages` | ||
jobs: | ||
sphinx_docs_to_gh-pages: | ||
deploy-book: | ||
runs-on: ubuntu-latest | ||
name: Sphinx docs to gh-pages | ||
steps: | ||
- name: Cancel Workflow Action | ||
uses: styfle/[email protected] | ||
- uses: actions/checkout@v3 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: "3.10" | ||
mamba-version: "*" | ||
channels: conda-forge,defaults | ||
channel-priority: true | ||
activate-environment: anaconda-client-env | ||
- name: Add conda to system path | ||
run: | | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Installing the library | ||
shell: bash -l {0} | ||
run: | | ||
pip install -r requirements.txt | ||
sudo wget https://github.com/jgm/pandoc/releases/download/1.16.0.2/pandoc-1.16.0.2-1-amd64.deb | ||
sudo dpkg -i pandoc-1.16.0.2-1-amd64.deb | ||
#sudo apt install pandoc | ||
python3 -m pip install sphinx | ||
pip install myst_parser | ||
- name: Running the Sphinx to gh-pages Action | ||
uses: uibcdf/[email protected] | ||
with: | ||
branch: main | ||
dir_docs: bootcamp | ||
sphinxopts: "" | ||
- uses: actions/checkout@v2 | ||
|
||
# Install dependencies | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
pip install jupyter-book | ||
# Build the book | ||
- name: Build the book | ||
run: | | ||
jupyter-book build . | ||
# Push the book's HTML to github-pages | ||
- name: GitHub Pages action | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./_build/html |