Skip to content

Commit 9b1e0b5

Browse files
committed
new workflow
1 parent 1fa3090 commit 9b1e0b5

File tree

4 files changed

+30
-37
lines changed

4 files changed

+30
-37
lines changed

.github/workflows/gh-pages.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
1-
name: Publish GitHub Pages
1+
name: Publish to GitHub Pages
22
on: push
33
jobs:
44
build:
55
runs-on: ubuntu-latest
66
steps:
7-
- name: Checkout repository
8-
uses: actions/checkout@v4
9-
- name: Extract BookML
10-
uses: docker://ghcr.io/vlmantova/bookml-full:latest-amd64
7+
- name: Compile with BookML
8+
id: bookml
9+
uses: vlmantova/bookml-action@v1
1110
with:
12-
args: update
13-
- name: Compile
14-
uses: docker://ghcr.io/vlmantova/bookml-full:latest-amd64
15-
- name: Setup pages
16-
uses: actions/configure-pages@v5
17-
- name: upload outputs
18-
uses: actions/upload-artifact@v4
11+
release: false
12+
upload-aux-directory: false
13+
replace-bookml: true
14+
- name: Create tarball
15+
run: |
16+
tar -cvf "$RUNNER_TEMP"/docs.tar.gz -C "$RUNNER_TEMP"/auxdir/html/docs --exclude=./LaTeXML.cache .
17+
- name: Upload pages artifact
18+
uses: actions/upload-artifact@v6
1919
with:
2020
name: github-pages
21-
path: '*.tar'
22-
retention-days: 1
21+
path: ${{ runner.temp }}/docs.tar.gz
2322
if-no-files-found: error
24-
overwrite: true
23+
retention-days: 1
24+
compression-level: 0
2525

2626
deploy:
27-
needs: build
28-
runs-on: ubuntu-latest
29-
environment:
30-
name: github-pages
31-
url: ${{ steps.deployment.outputs.page_url }}
3227
permissions:
33-
contents: read
3428
pages: write
3529
id-token: write
30+
environment:
31+
name: github-pages
32+
url: ${{ steps.deployment.outputs.page-url }}
33+
runs-on: ubuntu-latest
34+
needs: build
3635
steps:
3736
- name: Deploy to GitHub Pages
3837
id: deployment

GNUmakefile

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
SPLITAT=
22
LATEXMLPOSTEXTRAFLAGS=--timestamp=0
33

4-
# default target
5-
docs.tar:
6-
74
include bookml/bookml.mk
85

9-
%.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/$$*)))
10-
tar -cvf $@ --directory=$(AUX_DIR)/html/$* --exclude=./imsmanifest.xml --exclude=./LaTeXML.cache .
6+
TARGETS=$(TARGETS.html) $(AUX_DIR)/html/docs/index.plain.html
117

128
# custom rules to create plain style
139
# very hacky and not recommended until LaTeXML implements f:resource() or similar in XSLT
14-
docs.zip: $(AUX_DIR)/html/docs/index.plain.html
15-
docs.tar: $(AUX_DIR)/html/docs/index.plain.html
16-
1710
# build XML files
1811
$(AUX_DIR)/xml/docs.plain.xml: docs.tex $(BOOKML_DEPS_XML) $(wildcard *.ltxml) docs.pdf | $(AUX_DIR)/latexmlaux $(AUX_DIR)/xml
1912
@$(call bml.prog,latexml: $<$@)
20-
@$(call bml.cmd,$(LATEXML) $(if $(call bml.grep,{bookml/bookml},$<),,--preamble=literal:\RequirePackage{bookml/bookml} \
21-
) $(LATEXMLFLAGS) $(LATEXMLEXTRAFLAGS) --log="$(AUX_DIR)/latexmlaux/docs.plain.latexml.log" --destination="$@" "$<")
13+
@$(call bml.cmd,$(LATEXML) --preamble=literal:\RequirePackage[style=plain]{bookml/bookml} \
14+
$(LATEXMLFLAGS) $(LATEXMLEXTRAFLAGS) --log="$(AUX_DIR)/latexmlaux/docs.plain.latexml.log" --destination="$@" "$<")
2215

23-
$(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
16+
$(AUX_DIR)/html/%/index.plain.html: $$(AUX_DIR)/xml/$$*.plain.preprocessed-xml $$(AUX_DIR)/html/$$*/index.html $$(BOOKML_DEPS_HTML) $$(if $$(filter $$@,$$(BMLGOALS)),,FORCE) | $$(AUX_DIR)/html
2417
@$(eval _recurse:=$(if $(filter $@,$(BMLGOALS)),,yes))
2518
+@$(if $(_recurse),$(MAKE) --no-print-directory -f $(firstword $(MAKEFILE_LIST)) "$@" "BMLGOALS=$@")
26-
@$(if $(_recurse),,$(call bml.prog,latexmlpost: docs.plain.xml → docs/index.plain.html))
19+
@$(if $(_recurse),,$(call bml.prog,latexmlpost: $*.plain.xml → $(AUX_DIR)/html/$*/index.plain.html))
2720
@$(if $(_recurse),,$(call bml.cmd,$(LATEXMLPOST) $(if $(wildcard LaTeXML-html5.xsl),,--stylesheet=bookml/XSLT/bookml-html5.xsl) \
28-
$(if $(SPLITAT),--splitat=$(SPLITAT)) --xsltparameter=BMLSEARCH:yes $(LATEXMLPOSTFLAGS) $(LATEXMLPOSTEXTRAFLAGS) \
29-
--dbfile=$(AUX_DIR)/latexmlaux/docs.plain.LaTeXML.db --log="$(AUX_DIR)/latexmlaux/docs.plain.latexmlpost.log" --destination="$@" "$<"))
21+
$(if $(SPLITAT),--splitat=$(SPLITAT)) --urlstyle=file --pmml --mathtex \
22+
$(LATEXMLPOSTFLAGS) $(LATEXMLPOSTEXTRAFLAGS) --sourcedirectory=. $(LATEXMLPOSTAUTOFLAGS) \
23+
--dbfile=$(AUX_DIR)/latexmlaux/"$*".plain.LaTeXML.db --log="$(AUX_DIR)/latexmlaux/$*.plain.latexmlpost.log" --destination="$@" "$<"))

docs.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<a href="https://github.com/vlmantova/bookml/stargazers"><img alt="Stargazers on GitHub" src="https://img.shields.io/github/stars/vlmantova/bookml?logo=github"/></a>
9595
}
9696
97-
Formats: \href{https://vlmantova.github.io/bookml/}{GitBook} (html), \href{https://vlmantova.github.io/bookml/index.plain.html}{plain} with Latin Modern (html), \href{https://vlmantova.github.io/bookml/docs.pdf}{PDF}, \href{https://github.com/vlmantova/bookml/blob/docs/docs.tex}{\LaTeX{} source}.
97+
Formats: \href{https://vlmantova.github.io/bookml/}{GitBook} (html), \href{index.plain.html}{plain} with Latin Modern (html), \href{https://vlmantova.github.io/bookml/docs.pdf}{PDF}, \href{https://github.com/vlmantova/bookml/blob/docs/docs.tex}{\LaTeX{} source}.
9898
9999
For a more beginner friendly guide see the \href{https://vlmantova.github.io/bookmlleeds/}{Leeds BookML guide}.
100100
\end{center}

0 commit comments

Comments
 (0)