Skip to content

Add tutorial on symmetric tensors (#27) #59

Add tutorial on symmetric tensors (#27)

Add tutorial on symmetric tensors (#27) #59

Workflow file for this run

name: deploy-book
# Only run this when the master branch changes
on:
push:
branches:
- main
workflow_dispatch:
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Install dependencies
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- run: pip install -r lectures/requirements.txt
- name: Install LaTeX dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-xetex \
latexmk \
xindy \
texlive-luatex \
dvipng \
ghostscript \
cm-super
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.9
- name: Install IJulia and Setup Project
shell: bash
run: |
julia -e 'using Pkg; Pkg.add("IJulia");'
julia --project=lectures --threads auto -e 'using Pkg; Pkg.instantiate();'
- uses: julia-actions/cache@v1
- name: Download "build" folder (cache)
uses: dawidd6/action-download-artifact@v2
with:
workflow: cache.yml
branch: main
name: build-cache
path: _build
- name: Build Download Notebooks (sphinx-tojupyter)
shell: bash -l {0}
run: |
jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter
zip -r download-notebooks.zip _build/jupyter
- uses: actions/upload-artifact@v2
with:
name: download-notebooks
path: download-notebooks.zip
- name: Copy Download Notebooks for GH-PAGES
shell: bash -l {0}
run: |
mkdir -p _build/html/_notebooks
rsync -r _build/jupyter/ _build/html/_notebooks/
- name: Build the book
run: |
jupyter-book build lectures --path-output ./
# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: _build/html
clean-exclude: pr-preview
- name: Prepare notebooks sync
shell: bash
run: |
mkdir -p _build/lecture-julia.notebooks
cp -a _notebook_repo/. _build/lecture-julia.notebooks
cp -a _build/jupyter/. _build/lecture-julia.notebooks
rm -rf _build/lecture-julia.notebooks/_static
rm -rf _build/lecture-julia.notebooks/_panels_static
cp lectures/Project.toml _build/lecture-julia.notebooks
cp lectures/Manifest.toml _build/lecture-julia.notebooks
ls -a _build/lecture-julia.notebooks
- name: Commit notebooks to lecture-julia.notebooks
uses: cpina/[email protected]
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: _build/lecture-julia.notebooks
destination-github-username: quantumghent
destination-repository-name: TensorTutorials.notebooks
user-email: [email protected]
target-branch: main