From 511772e25a0c1765bc917f2ce8ac05b3666a6b38 Mon Sep 17 00:00:00 2001 From: Torben <59419684+entorb@users.noreply.github.com> Date: Wed, 4 May 2022 07:39:43 +0200 Subject: [PATCH] auto make via github actions Update cleanup.sh Update make.yml minor Update make_pdfs.sh latexmk -C Update cleanup.sh --- .github/workflows/{build.yml => make.yml} | 48 ++++++++++++++--------- cleanup.sh | 4 ++ install_requirements.sh | 0 make_ebooks.sh | 2 +- make_pdfs.sh | 14 +++---- 5 files changed, 42 insertions(+), 26 deletions(-) rename .github/workflows/{build.yml => make.yml} (56%) create mode 100755 cleanup.sh mode change 100644 => 100755 install_requirements.sh mode change 100644 => 100755 make_ebooks.sh mode change 100644 => 100755 make_pdfs.sh diff --git a/.github/workflows/build.yml b/.github/workflows/make.yml similarity index 56% rename from .github/workflows/build.yml rename to .github/workflows/make.yml index 527183ff..8937e441 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/make.yml @@ -1,7 +1,8 @@ name: Build HPMOR PDFs and eBooks -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch +# Controls when the action will run. +# workflow_dispatch: manual triggering +# push: triggers the workflow on push request events but only for the master branch on: workflow_dispatch: push: @@ -10,18 +11,18 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: job1: - # runs-on: ubuntu-latest - runs-on: ubuntu-20.04 + # runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: # Initialize - name: print start date - run: | - date +%Y-%m-%d_%H:%M + run: date +%Y-%m-%d_%H:%M - name: Checkout Repository uses: actions/checkout@v2 with: + ref: master persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token fetch-depth: 0 # otherwise, you will failed to push refs to dest repo @@ -29,28 +30,39 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.9' - + + - name: test ls before + run: | + pwd + ls -l + +# - name: Quality check of chapters for known issues +# run: python3 check-chapters.py + - name: Install requirements - run: install_requirements.sh + run: sh install_requirements.sh + + - name: Make PDFs + run: sh make_pdfs.sh -# Build - - name: Build PDFs - run: ./make_pdfs.sh + - name: Make eBooks + run: sh make_ebooks.sh - - name: Build ebooks - run: ./make_ebooks.sh + - name: test ls after + run: | + pwd + ls -l # Publish to release - name: Upload to release uses: softprops/action-gh-release@v1 with: - tag_name: MyPrereleaseTag + tag_name: WorkInProgress prerelease: true - files: - ./*.pdf + files: | + ./hpmor*.pdf ebook/output/hpmor.epub ebook/output/hpmor.mobi - name: print end date - run: | - date +%Y-%m-%d_%H:%M + run: date +%Y-%m-%d_%H:%M diff --git a/cleanup.sh b/cleanup.sh new file mode 100755 index 00000000..3187ab82 --- /dev/null +++ b/cleanup.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +latexmk -C +rm -rf ebook/tmp diff --git a/install_requirements.sh b/install_requirements.sh old mode 100644 new mode 100755 diff --git a/make_ebooks.sh b/make_ebooks.sh old mode 100644 new mode 100755 index 5394a782..27dbe377 --- a/make_ebooks.sh +++ b/make_ebooks.sh @@ -1,4 +1,4 @@ #!/bin/sh cd ebook -./1_latex2html.py && ./2_html2epub.sh +python3 ./1_latex2html.py && sh ./2_html2epub.sh diff --git a/make_pdfs.sh b/make_pdfs.sh old mode 100644 new mode 100755 index 64f09c17..62d23bbb --- a/make_pdfs.sh +++ b/make_pdfs.sh @@ -1,10 +1,10 @@ #!/bin/sh -# TODO -# latexmk hpmor +latexmk hpmor + latexmk hpmor-1 -# latexmk hpmor-2 -# latexmk hpmor-3 -# latexmk hpmor-4 -# latexmk hpmor-5 -# latexmk hpmor-6 +latexmk hpmor-2 +latexmk hpmor-3 +latexmk hpmor-4 +latexmk hpmor-5 +latexmk hpmor-6