Skip to content

Commit

Permalink
скачивать уже готовую pdf книгу курса (#425)
Browse files Browse the repository at this point in the history
* ci: update to save finish pdf book

* ci: fix folder cd

* ci: fix folder

* ci: try to igonre xelatex errors

* ci: add `-halt-on-error` to latex

* reject the last updated toc file

* ci: ignore exit 1 for step xelatex

* ci: replace to `always()` for xelatex step

* ci: change `alwats` to `continue-on-error:true`

* ci: fix publish_dir for pdf book

* ci: return `create_folder_for_latex` to save all latex files with pdf

* feature: add to jb link to download pdf book

* docs: update shiled & add new to download pdf book

* ci: update deploy-book-master according stage

* docs: remove building page part

* refactor: update title to download book into jb

* ci: remove `*-recommended` for xelatex

* ci: change to master too

* fix: replace stage to master to download pdf
  • Loading branch information
vvssttkk committed Jul 9, 2022
1 parent 8e2b1e4 commit c5692cc
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 32 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/deploy-book-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,18 @@ jobs:

- name: build latex files
run: |
export DWAVE_TOKEN="${{ secrets.DWAVE_TOKEN }}"
sudo apt-get install texlive-latex-extra texlive-fonts-extra texlive-xetex latexmk
export DWAVE_TOKEN="${{ secrets.DWAVE_TOKEN }}"
poetry run jupyter-book build ./qmlcourse --builder latex
- name: update latex dir to building branch
- name: create pdf book
continue-on-error: true
run: |
cd ./qmlcourse/_build/latex/
xelatex -interaction=nonstopmode qmlcourse.tex
- name: send pdf book to building branch
uses: peaceiris/actions-gh-pages@v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/deploy-book-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,18 @@ jobs:

- name: build latex files
run: |
export DWAVE_TOKEN="${{ secrets.DWAVE_TOKEN }}"
sudo apt-get install texlive-latex-extra texlive-fonts-extra texlive-xetex latexmk
export DWAVE_TOKEN="${{ secrets.DWAVE_TOKEN }}"
poetry run jupyter-book build ./qmlcourse --builder latex
- name: update latex dir to building branch
- name: create pdf book
continue-on-error: true
run: |
cd ./qmlcourse/_build/latex/
xelatex -interaction=nonstopmode qmlcourse.tex
- name: send pdf book to building branch
uses: peaceiris/actions-gh-pages@v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
37 changes: 9 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@

# QMLCourse

<a href="https://quantum-ods.github.io/qmlcourse/" target="_blank">
<img alt="shield_website_jb" src="https://img.shields.io/website?style=for-the-badge&up_color=blueviolet&up_message=nightly-build&url=https%3A%2F%2Fquantum-ods.github.io%2Fqmlcourse%2Fbook%2Findex.html">
<a href="https://quantum-ods.github.io/qmlcourse/">
<img alt="shield_website_jb" src="https://img.shields.io/badge/jb-nightly--buil-blueviolet?style=for-the-badge">
</a>
<a href="https://ods.ai/tracks/qmlcourse" target="_blank">
<img alt="shield_website_ods" src="https://img.shields.io/website?style=for-the-badge&up_color=critical&up_message=ods.ai&url=https%3A%2F%2Fods.ai%2Ftracks%2Fqmlcourse">
<a href="https://github.com/quantum-ods/qmlcourse/blob/master/LICENSE">
<img alt="shield_license" src="https://img.shields.io/github/license/quantum-ods/qmlcourse?style=for-the-badge">
<a href="https://ods.ai/tracks/qmlcourse">
<img alt="shield_ods_page" src="https://img.shields.io/badge/ods.ai-course%20page-critical?style=for-the-badge">
</a>
<a href="https://github.com/quantum-ods/qmlcourse/raw/web-page-master/latex/qmlcourse.pdf">
<img alt="shield_download_pdf_book" src="https://img.shields.io/badge/pdf%20book-download-information?style=for-the-badge">
</a>

<p align="left">
<a href="https://github.com/quantum-ods/qmlcourse/blob/master/LICENSE">
<img alt="shield_license" src="https://img.shields.io/github/license/quantum-ods/qmlcourse">
</a>
<a href="https://github.com/quantum-ods/qmlcourse/actions/workflows/pre-commit.yml">
<img alt="pre_commit" src="https://github.com/quantum-ods/qmlcourse/actions/workflows/pre-commit.yml/badge.svg">
</a>
Expand Down Expand Up @@ -49,28 +52,6 @@ Some ideas, suggestions, remarks, etc. you can write on the [discussions](https:
- **RED** &mdash; advanced-level lectures that deeply explain the math and the principles underlying QML.
- **WHITE** &mdash; career in quantum computations and quantum QML

## Build the book

Building the PDF-version of the book is very time-expensive and could not be automated via GutHub actions. If you want the PDF-version of the book you should run the following commands:

- `xelatex` (for Debian-based Linux platforms):
```
sudo apt-get install texlive-latex-recommended texlive-latex-extra \
texlive-fonts-recommended texlive-fonts-extra \
texlive-xetex latexmk
```

```
git clone https://github.com/quantum-ods/qmlcourse.git
cd qmlcourse/
git checkout web-page-master
cd latex/
```

```
xelatex -interaction nonstopmode qmlcourse.tex
```

## Team

The main authors, reviewers, editors, DevOps you can find [here](https://quantum-ods.github.io/qmlcourse/book/authors.html).
Expand Down
2 changes: 2 additions & 0 deletions qmlcourse/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@
- file: book/glossary.md
- file: book/acknowledgments.md
- file: book/leaderboard.md
- url: https://github.com/quantum-ods/qmlcourse/raw/web-page-master/latex/qmlcourse.pdf
title: Скачать pdf книгу / Download pdf book

# :en:

Expand Down

0 comments on commit c5692cc

Please sign in to comment.