Skip to content

Commit

Permalink
Tools/build pdfs only when needed (#84)
Browse files Browse the repository at this point in the history
Fixes #56
  • Loading branch information
ralfhandl authored Aug 3, 2023
1 parent 3c1cfb8 commit 7b782e5
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Node CI

on: push
on:
push:

jobs:
build:
Expand All @@ -24,11 +25,17 @@ jobs:
- name: Build docs
run: |
npm ci
npm run build --if-present
npm run build
git config user.name ${GITHUB_ACTOR}
git config user.email ${PUSHER_EMAIL}
git add docs/*/*.html docs/*/*.md docs/*/styles/*
git diff-index --quiet HEAD docs/*/*.html docs/*/*.md docs/*/styles/* || (npm run pdf --if-present && git add docs/*/*.pdf && git commit -m "auto-refreshed")
test `git branch --show-current` && git push
for dir in docs/*/ # list directories in the form "docs/dirname/"
do
doc=${dir%/} # remove the trailing "/"
doc=${doc##*/} # retain everything after the final "/"
git diff-index --quiet HEAD $dir/*.html $dir/styles/* || npm run pdf $doc
done
git add docs/*/*.pdf
git diff-index --quiet HEAD docs/* || ( git commit -m "auto-refreshed" && git push )
env:
PUSHER_EMAIL: ${{ github.event.pusher.email }}
Binary file modified docs/odata-protocol/odata-protocol.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/odata-url-conventions/odata-url-conventions.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>OData Version 4.01. Part 2: URL Conventions</title>
<title>OData Version 4.02. Part 2: URL Conventions</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand Down Expand Up @@ -32,7 +32,7 @@
<h1 id="odata-version-402-part-2-url-conventions">OData Version 4.02. Part 2: URL Conventions</h1>
<h2 id="committee-specification-draft-01">Committee Specification Draft 01</h2>
<h2 id="14-july-2023">14 July 2023</h2>
<p> </p>
<p><span class="math inline">\(\hbox{}\)</span></p>
<h4 id="this-stage">This stage:</h4>
<p><a href="https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.md">https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.md</a> (Authoritative)<br />
<a href="https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.html">https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.html</a><br />
Expand Down Expand Up @@ -143,7 +143,7 @@ <h3 id="123-document-conventions"><a name="Documentconventions" href="#Documentc
--mathjax
--eol=lf
--wrap=none
--metadata pagetitle=&quot;OData Version 4.01. Part 2: URL Conventions&quot;
--metadata pagetitle=&quot;OData Version 4.02. Part 2: URL Conventions&quot;
odata-v4.02-csd01-part2-url-conventions.md</code></pre>
<p>This uses pandoc 3.1.2 from <a href="https://github.com/jgm/pandoc/releases/tag/3.1.2">https://github.com/jgm/pandoc/releases/tag/3.1.2</a>.</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/odata-url-conventions/odata-url-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## 14 July 2023

&nbsp;
$\hbox{}$

#### This stage:
https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.md (Authoritative) \
Expand Down Expand Up @@ -154,7 +154,7 @@ pandoc -f gfm+tex_math_dollars+fenced_divs
--mathjax
--eol=lf
--wrap=none
--metadata pagetitle="OData Version 4.01. Part 2: URL Conventions"
--metadata pagetitle="OData Version 4.02. Part 2: URL Conventions"
odata-v4.02-csd01-part2-url-conventions.md
```

Expand Down
Binary file modified docs/odata-url-conventions/odata-url-conventions.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions odata-url-conventions/0 frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

-------

# OData Version 4.02. Part 2: URL Conventions
# $$$pagetitle$$$

## Committee Specification Draft 01
## $$$subtitle$$$

## 14 July 2023

&nbsp;
$\hbox{}$

#### This stage:
https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.md (Authoritative) \
Expand Down
2 changes: 1 addition & 1 deletion odata-url-conventions/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pagetitle: 'OData Version 4.01. Part 2: URL Conventions'
pagetitle: 'OData Version 4.02. Part 2: URL Conventions'
subtitle: Committee Specification Draft 01
filename: odata-v4.02-csd01-part2-url-conventions
stage: csd01
Expand Down

0 comments on commit 7b782e5

Please sign in to comment.