Skip to content

Commit

Permalink
# This is a combination of 16 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

Update generate-pdfs.yml
# This is the commit message #2:

Update generate-pdfs.yml
# This is the commit message #3:

Update gen-pdfs.sh
# This is the commit message #4:

Update gen-pdfs.sh
# This is the commit message #5:

Update pdf-data.yml
# This is the commit message #6:

Update pdf-data.yml
# This is the commit message #7:

Update pdf-data.yml
# This is the commit message #8:

Update generate-pdfs.yml
# This is the commit message #9:

Update generate-pdfs.yml
# This is the commit message #10:

Update pdf-data.yml
# This is the commit message #11:

Update pdf-data.yml
# This is the commit message #12:

Update generate-pdfs.yml
# This is the commit message #13:

Update generate-pdfs.yml
# This is the commit message #14:

Update generate-pdfs.yml
# This is the commit message #15:

Update PDFs
# This is the commit message #16:

Create generate-pdfs.yml
  • Loading branch information
shawaj committed Nov 4, 2021
1 parent 4aceef5 commit 0d9c61a
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 15 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/generate-pdfs.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
name: Generate PDFs

on:
push:
branches:
- main
schedule:
- cron: "15 0 * * *" # Run daily at 00.15
workflow_dispatch:

jobs:
convert_via_pandoc:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- uses: docker://pandoc/latex:2.9
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}

- name: Get current branch
run: |
# Get the current branch and output as environment variable
GITHUB_BRANCH=$( echo "${{ github.ref }}" | sed 's/refs\/heads\///g' )
echo "GITHUB_BRANCH=$GITHUB_BRANCH" >> $GITHUB_ENV
- name: Generate PDFs
uses: docker://pandoc/latex:2.9
with:
args: ${{ github.action_path }}/pdf-gen/gen-pdfs.sh
entrypoint: pdf-gen/gen-pdfs.sh

- uses: actions/upload-artifact@master
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: output
path: docs/pdfs/
name: pdf-artifacts
path: docs/pdfs/*.pdf

- name: Update PDFs on repo
uses: test-room-7/action-update-file@v1
with:
branch: ${{ env.GITHUB_BRANCH }}
file-path: docs/pdfs/*.pdf
commit-msg: Update PDFs
github-token: ${{ secrets.GITHUB_TOKEN }}

Binary file added docs/pdfs/indoor-overview.pdf
Binary file not shown.
Binary file added docs/pdfs/indoor-quick-start.pdf
Binary file not shown.
Binary file added docs/pdfs/outdoor-overview.pdf
Binary file not shown.
Binary file added docs/pdfs/outdoor-quick-start.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions pdf-gen/gen-pdfs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

pandoc pdf-data.yml ../docs/indoor-hotspot/overview.md -o ../docs/pdfs/indoor-overview.pdf --pdf-engine=xelatex --resource-path ../docs/media/
pandoc pdf-data.yml ../docs/indoor-hotspot/quick-start.md -o ../docs/pdfs/indoor-quick-start.pdf --pdf-engine=xelatex --resource-path ../docs/media/
pandoc pdf-data.yml ../docs/outdoor-hotspot/overview.md -o ../docs/pdfs/outdoor-overview.pdf --pdf-engine=xelatex --resource-path ../docs/media/
pandoc pdf-data.yml ../docs/outdoor-hotspot/quick-start.md -o ../docs/pdfs/outdoor-quick-start.pdf --pdf-engine=xelatex --resource-path ../docs/media/
pandoc pdf-gen/pdf-data.yml docs/indoor-hotspot/overview.md -o docs/pdfs/indoor-overview.pdf --pdf-engine=xelatex --resource-path docs/media/
pandoc pdf-gen/pdf-data.yml docs/indoor-hotspot/quick-start.md -o docs/pdfs/indoor-quick-start.pdf --pdf-engine=xelatex --resource-path docs/media/
pandoc pdf-gen/pdf-data.yml docs/outdoor-hotspot/overview.md -o docs/pdfs/outdoor-overview.pdf --pdf-engine=xelatex --resource-path docs/media/
pandoc pdf-gen/pdf-data.yml docs/outdoor-hotspot/quick-start.md -o docs/pdfs/outdoor-quick-start.pdf --pdf-engine=xelatex --resource-path docs/media/
4 changes: 3 additions & 1 deletion pdf-gen/pdf-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ header-includes:
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength\headheight{28pt}
\fancyhead[L]{\includegraphics[width=5cm]{../docs/media/Nebra.png}}
\fancyhead[L]{\includegraphics[width=5cm]{docs/media/Nebra.png}}
\fancyfoot[LE,RO]{Nebra LTD. 2021}
fontsize: 14pt
mainfont: Ubuntu-Regular.ttf
mainfontoptions:
- Path=pdf-gen/
- BoldFont=Ubuntu-Bold.ttf
- ItalicFont=Ubuntu-Italic.ttf
- BoldItalicFont=Ubuntu-BoldItalic.ttf
monofont: UbuntuMono-Regular.ttf
monofontoptions:
- Path=pdf-gen/
- BoldFont=UbuntuMono-Bold.ttf
- ItalicFont=UbuntuMono-Italic.ttf
- BoldItalicFont=UbuntuMono-BoldItalic.ttf
Expand Down

0 comments on commit 0d9c61a

Please sign in to comment.