Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb authored and rrthomas committed May 11, 2022
1 parent 96203cd commit 915e5ec
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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
on:
workflow_dispatch:
push:
branches: [ master ]

# 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
steps:

# Initialize
- name: print start date
run: |
date +%Y-%m-%d_%H:%M
- name: Checkout Repository
uses: actions/checkout@v2
with:
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: Install requirements
run: install_requirements.sh

# Build
- name: Build PDFs
run: ./make_pdfs.sh

- name: Build ebooks
run: ./make_ebooks.sh

# Publish to release
- name: Upload to release
uses: softprops/action-gh-release@v1
with:
tag_name: MyPrereleaseTag
prerelease: true
files:
./*.pdf
ebook/output/hpmor.epub
ebook/output/hpmor.mobi

- name: print end date
run: |
date +%Y-%m-%d_%H:%M
7 changes: 7 additions & 0 deletions install_requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

# pdf
sudo apt install texlive-xetex latexmk

# ebook
sudo apt install calibre
4 changes: 4 additions & 0 deletions make_ebooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

cd ebook
./1_latex2html.py && ./2_html2epub.sh
10 changes: 10 additions & 0 deletions make_pdfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

# TODO
# latexmk hpmor
latexmk hpmor-1
# latexmk hpmor-2
# latexmk hpmor-3
# latexmk hpmor-4
# latexmk hpmor-5
# latexmk hpmor-6

0 comments on commit 915e5ec

Please sign in to comment.