Create Epub #67
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
name: Create Epub | |
on: workflow_dispatch | |
jobs: | |
build_pages: | |
name: Create Epub | |
runs-on: ubuntu-latest | |
env: | |
ANT_OPTS: -Xmx6g | |
steps: | |
- name: Perform Checkout | |
uses: actions/checkout@v3 | |
- name: Install Saxon and Ant | |
run: | | |
apt-get update && apt-get install openjdk-11-jre-headless ant -y --no-install-recommend | |
./shellscripts/script.sh | |
- name: Install Ant-Contrib | |
run: | | |
wget https://repo1.maven.org/maven2/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar | |
mv ant-contrib-1.0b3.jar /usr/share/ant/lib | |
- name: Fetch data | |
run: | | |
./fetch-data.sh | |
- name: Remove files that are not approved | |
run: | | |
python ./remove-unapproved-files.py | |
- name: Prepare files for Epub | |
run: | | |
ant -f ./editions-to-epub.xml | |
- name: Remove empty namespace declarations | |
run: | | |
python ./remove-empty-namespace-declarations.py | |
- name: Remove TEI files | |
run: | | |
python ./remove-tei-files.py | |
- name: Create TOCs for the Epub | |
run: | | |
ant -f ./create-tocs.xml | |
- name: Create Epub | |
run: | | |
zip -rX out/schnitzler-briefe.epub mimetype META-INF/ OEBPS/ -x "*.DS_Store" -x "README.md" -x "epubcheck.jar" -x "lib" -x "out" -x "obsolete" -x "xslt" -x ".gitignore" -x ".git" -x ".github" -x "fetch-data.sh" -x "remove-unapproved-files.py" -x "remove-empty-namespace-declarations.py" -x "remove-tei-files.py" -x "requirements.txt" -x "shellscripts" -x "editions-to-epub.xml" -x "create-tocs.xml" -x "LICENSE" | |
#- name: Validate Epub | |
#run: | | |
#java -jar ./epubcheck.jar ./out/schnitzler-briefe.epub | |
- name: Commit and Push | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
commit_message: Generated new Epub |