Skip to content

Commit

Permalink
auto make via github actions
Browse files Browse the repository at this point in the history
Update cleanup.sh

Update make.yml

minor

Update make_pdfs.sh

latexmk -C

Update cleanup.sh
  • Loading branch information
entorb authored and rrthomas committed May 11, 2022
1 parent 915e5ec commit 511772e
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 26 deletions.
48 changes: 30 additions & 18 deletions .github/workflows/build.yml → .github/workflows/make.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -10,47 +11,58 @@ 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

- name: Python setup
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
4 changes: 4 additions & 0 deletions cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

latexmk -C
rm -rf ebook/tmp
Empty file modified install_requirements.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion make_ebooks.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

cd ebook
./1_latex2html.py && ./2_html2epub.sh
python3 ./1_latex2html.py && sh ./2_html2epub.sh
14 changes: 7 additions & 7 deletions make_pdfs.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 511772e

Please sign in to comment.