Skip to content

Commit 641407a

Browse files
authored
add PDF release GitHub action (#341)
1 parent 0366a57 commit 641407a

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and release PDF
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
16+
- name: Extract assets
17+
run: docker cp $(docker run --detach quay.io/redhat-docs/redhat-docs-pdf-template):/pdf-assets ./supplementary_style_guide/pdf-assets
18+
19+
- name: Build PDF
20+
uses: docker://quay.io/redhat-docs/redhat-docs-pdf-template
21+
with:
22+
args: supplementary_style_guide/main.adoc
23+
24+
- name: Create PDF release
25+
run: |
26+
CURRENT_DATE=$(date +'%Y-%m-%d')
27+
echo v$GITHUB_RUN_NUMBER > version.txt
28+
mv main.pdf red-hat-supplementary-style-guide.pdf
29+
gh release create "$CURRENT_DATE""_v$GITHUB_RUN_NUMBER" red-hat-supplementary-style-guide.pdf
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
master.html
22
main*.html
33
index.html
4-
assets
4+
assets
5+
pdf-assets

supplementary_style_guide/introduction/about-guide.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ In addition to the _IBM Style_ guide and the _Red Hat supplementary style guide
2020
* link:https://redhat-documentation.github.io/modular-docs/[_Modular Documentation Reference Guide_]: Guidance for all things connected to modular documentation, including implementing those guidelines in AsciiDoc.
2121
* link:https://redhat-documentation.github.io/asciidoc-markup-conventions/[_AsciiDoc Mark-up Quick Reference_]: Guidance specific to writing in AsciiDoc. Includes links to complete documentation for AsciiDoc and Asciidoctor.
2222
* link:https://redhat-documentation.github.io/accessibility-guide/[_Getting started with accessibility for writers_]: Guidance for creating accessible content.
23+
24+
== PDF version
25+
26+
The _Red Hat supplementary style guide for product documentation_ is also available as a PDF. You can download the link:https://github.com/redhat-documentation/supplementary-style-guide/releases/latest/download/red-hat-supplementary-style-guide.pdf[latest version of the guide as a PDF] from the GitHub releases section of project's GitHub repository.

0 commit comments

Comments
 (0)