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 527183ff7..8937e441a 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 000000000..3187ab82d --- /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 5394a7828..27dbe3778 --- 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 64f09c174..62d23bbbc --- 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