forked from bogdanb/hpmor
-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
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
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: | ||
ebook/output/hpmor.epub | ||
ebook/output/hpmor.mobi | ||
|
||
- name: print end date | ||
run: | | ||
date +%Y-%m-%d_%H:%M |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
sudo apt install texlive-xetex latexmk | ||
|
||
# ebook | ||
sudo apt install calibre |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
cd ebook | ||
./1_latex2html.py && ./2_html2epub.sh |
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
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 |