Skip to content

Commit

Permalink
Added LaTeX PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
niemasd committed Nov 23, 2023
1 parent a43bcb8 commit f8073ff
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 181 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:22.04
MAINTAINER Niema Moshiri <[email protected]>
RUN apt-get update && apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y g++ gcc git python3 python3-dev python3-pip && \
DEBIAN_FRONTEND=noninteractive apt-get install -y g++ gcc git python3 python3-dev python3-pip texlive-fonts-extra texlive-latex-extra texlive-xetex latexmk && \
python3 -m pip install --upgrade --no-cache-dir --ignore-installed pip && \
pip3 install --no-cache-dir --ignore-installed wheel && \
pip3 install --no-cache-dir --ignore-installed jupyter-book && \
Expand Down
26 changes: 23 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ jobs:
python-version: 3.8
- name: Install dependencies
run: |
pip install -r teach_online/requirements.txt
pip install -r teach_online/requirements.txt && \
sudo apt-get install -y texlive-fonts-extra texlive-latex-extra texlive-xetex latexmk
- name: Build Book
run: |
jupyter-book build teach_online
jupyter-book build teach_online && \
jupyter-book build teach_online --builder pdflatex
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
Expand All @@ -50,4 +52,22 @@ jobs:
path: 'teach_online/_build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v2
- name: Generate release tag
id: tag
run: |
echo "::set-output name=release_tag::$(date +"%Y-%m-%d_%H-%M-%S")"
- name: Publish release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.release_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload built PDF to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: teach_online/_build/latex/book.pdf
asset_name: How-to-Teach-Online.pdf
tag: ${{ steps.tag.outputs.release_tag }}
overwrite: true
1 change: 1 addition & 0 deletions teach_online/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ execute:

# Define the name of the latex output file for PDF builds
latex:
use_jupyterbook_latex: false
latex_documents:
targetname: book.tex

Expand Down
2 changes: 0 additions & 2 deletions teach_online/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ format: jb-book
root: intro
chapters:
- file: markdown
- file: notebooks
- file: markdown-notebooks
53 changes: 0 additions & 53 deletions teach_online/markdown-notebooks.md

This file was deleted.

122 changes: 0 additions & 122 deletions teach_online/notebooks.ipynb

This file was deleted.

0 comments on commit f8073ff

Please sign in to comment.