Update readme.md #123
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
name: cd-prod | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
env: | |
PUBLISH_BRANCH: web-page-prod | |
jobs: | |
generate-plantuml-diagrams: | |
runs-on: ubuntu-latest | |
timeout-minutes: 2 | |
steps: | |
- name: checkout to build branch | |
uses: actions/checkout@v4 | |
- name: generate `**.svg` for `**.plantuml` | |
uses: holowinski/plantuml-github-action@main | |
with: | |
args: -v -tsvg **.plantuml | |
- name: push diagrams to runing branch | |
uses: EndBug/[email protected] | |
with: | |
message: auto-generate `**.svg` for `**.plantuml` | |
create-folder-for-latex: | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
steps: | |
- name: checkout to build branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.PUBLISH_BRANCH }} | |
- name: create `./latex/` | |
run: | | |
mkdir -p ./latex/ | |
build-and-deploy-book: | |
needs: [generate-plantuml-diagrams, create-folder-for-latex] | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: checkout branch for build | |
uses: actions/checkout@v4 | |
- name: set up poetry | |
uses: snok/[email protected] | |
with: | |
version: 1.3.2 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
cache: 'poetry' | |
- name: install dependencies | |
run: | | |
poetry install --no-interaction --no-root | |
- name: build the book | |
id: build_book | |
env: | |
DWAVE_TOKEN: ${{ secrets.DWAVE_TOKEN }} | |
run: | | |
poetry run jupyter-book toc migrate ./qmlcourse/_toc.yml -o ./qmlcourse/_toc.yml | |
poetry run jupyter-book build ./qmlcourse | |
- name: update publish dir to build branch | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./qmlcourse/_build/html/ | |
publish_branch: ${{ env.PUBLISH_BRANCH }} | |
# - name: build latex files | |
# env: | |
# DWAVE_TOKEN: ${{ secrets.DWAVE_TOKEN }} | |
# run: | | |
# sudo apt-get install texlive-latex-extra texlive-fonts-extra texlive-xetex latexmk | |
# poetry run jupyter-book build ./qmlcourse --builder latex | |
# - name: create pdf book | |
# continue-on-error: true | |
# run: | | |
# cd ./qmlcourse/_build/latex/ | |
# xelatex -interaction=nonstopmode qmlcourse.tex | |
# - name: send pdf book to build branch | |
# uses: peaceiris/[email protected] | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# publish_dir: ./qmlcourse/_build/latex/ | |
# destination_dir: ./latex/ | |
# publish_branch: ${{ env.PUBLISH_BRANCH }} |