-
Notifications
You must be signed in to change notification settings - Fork 1
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
61 additions
and
9 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,39 @@ | ||
name: Publish GitHub Pages | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Extract BookML | ||
uses: docker://ghcr.io/vlmantova/bookml:latest | ||
with: | ||
args: update | ||
- name: Compile | ||
uses: docker://ghcr.io/vlmantova/bookml:latest | ||
- name: Setup pages | ||
uses: actions/configure-pages@v5 | ||
- name: upload outputs | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: github-pages | ||
path: '*.tar' | ||
retention-days: 1 | ||
if-no-files-found: error | ||
overwrite: true | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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 |
---|---|---|
@@ -1,16 +1,29 @@ | ||
SPLITAT= | ||
LATEXMLPOSTEXTRAFLAGS=--timestamp=0 | ||
|
||
# default target | ||
docs.tar: | ||
|
||
include bookml/bookml.mk | ||
|
||
%.tar: $$(AUX_DIR)/html/$$*/index.html $$(filter-out $$(AUX_DIR)/html/$$*/imsmanifest.xml,$$(filter-out $$(AUX_DIR)/html/$$*/LaTeXML.cache,$$(call bml.reclist.file,$$(AUX_DIR)/html/$$*))) | ||
tar -cvf $@ --directory=$(AUX_DIR)/html/$* --exclude=./imsmanifest.xml --exclude=./LaTeXML.cache . | ||
|
||
# custom rules to create plain style | ||
# very hacky and not recommended until LaTeXML implements f:resource() or similar in XSLT | ||
docs.zip: $(AUX_DIR)/html/docs/index.plain.html | ||
docs.tar: $(AUX_DIR)/html/docs/index.plain.html | ||
|
||
$(AUX_DIR)/xml/docs.plain.xml: docs.tex $(BOOKML_DEPS_XML) $(wildcard *.ltxml) | ||
$(LATEXML) --preamble=literal:\\RequirePackage[style=plain]{bookml/bookml} \ | ||
--log="$(AUX_DIR)/latexmlaux/docs.plain.latexml.log" --destination="$@" "$<" | ||
# build XML files | ||
$(AUX_DIR)/xml/docs.plain.xml: docs.tex $(BOOKML_DEPS_XML) $(wildcard *.ltxml) docs.pdf | $(AUX_DIR)/latexmlaux $(AUX_DIR)/xml | ||
@$(call bml.prog,latexml: $< → $@) | ||
@$(call bml.cmd,$(LATEXML) $(if $(call bml.grep,{bookml/bookml},$<),,--preamble=literal:\RequirePackage{bookml/bookml} \ | ||
) $(LATEXMLFLAGS) $(LATEXMLEXTRAFLAGS) --log="$(AUX_DIR)/latexmlaux/docs.plain.latexml.log" --destination="$@" "$<") | ||
|
||
$(AUX_DIR)/html/docs/index.plain.html: $(AUX_DIR)/xml/docs.plain.xml $(BOOKML_DEPS_HTML) $(wildcard bmlimages/docs*.svg) | ||
$(LATEXMLPOST) $(if $(wildcard LaTeXML-html5.xsl),,--stylesheet=bookml/XSLT/bookml-html5.xsl) \ | ||
--urlstyle=file --dbfile=$(AUX_DIR)/latexmlaux/docs.plain.LaTeXML.db --log="$(AUX_DIR)/latexmlaux/docs.plain.latexmlpost.log" \ | ||
--timestamp=0 --destination="$@" "$<" | ||
$(AUX_DIR)/html/docs/index.plain.html: $$(AUX_DIR)/xml/docs.plain.xml $$(AUX_DIR)/html/docs/index.html $$(BOOKML_DEPS_HTML) $$(wildcard bmlimages/docs-*.svg) $$(wildcard bmlimages/docs/docs.dpth) bookml/search_index.pl bookml/XSLT/proc-text.xsl $$(if $$(filter $$@,$$(BMLGOALS)),,FORCE) | $$(AUX_DIR)/html | ||
@$(eval _recurse:=$(if $(filter $@,$(BMLGOALS)),,yes)) | ||
+@$(if $(_recurse),$(MAKE) --no-print-directory -f $(firstword $(MAKEFILE_LIST)) "$@" "BMLGOALS=$@") | ||
@$(if $(_recurse),,$(call bml.prog,latexmlpost: docs.plain.xml → docs/index.plain.html)) | ||
@$(if $(_recurse),,$(call bml.cmd,$(LATEXMLPOST) $(if $(wildcard LaTeXML-html5.xsl),,--stylesheet=bookml/XSLT/bookml-html5.xsl) \ | ||
$(if $(SPLITAT),--splitat=$(SPLITAT)) --xsltparameter=BMLSEARCH:yes $(LATEXMLPOSTFLAGS) $(LATEXMLPOSTEXTRAFLAGS) \ | ||
--dbfile=$(AUX_DIR)/latexmlaux/docs.plain.LaTeXML.db --log="$(AUX_DIR)/latexmlaux/docs.plain.latexmlpost.log" --destination="$@" "$<")) |
Submodule bookml
updated
7 files
+29 −0 | .github/workflows/release.yml | |
+7 −26 | Dockerfile | |
+35 −0 | Dockerfile-latexml | |
+26 −5 | Dockerfile-texlive | |
+17 −9 | Makefile | |
+2 −2 | XSLT/gitbook.xsl | |
+24 −26 | bookml.mk |
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