Skip to content

Commit a2b63fd

Browse files
roiserbernhardmgruber
authored andcommitted
Add GH action to build and publish pdf slides
1 parent cd405b8 commit a2b63fd

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/slides.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish slides
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
publish-slides:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
version: [ essentials, full ]
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Setup essentials course
16+
if: matrix.version == 'essentials'
17+
run: echo '\setboolean{onlybasics}{true}' > talk/onlybasics.tex
18+
- name: Compile LaTeX document
19+
uses: xu-cheng/latex-action@v2
20+
with:
21+
root_file: C++Course.tex
22+
latexmk_use_xelatex: true
23+
args: -f -pdf -interaction=nonstopmode -shell-escape
24+
working_directory: talk
25+
extra_system_packages: "py-pygments"
26+
- name: Commit to download repository
27+
run: |
28+
set -x
29+
git clone -b download https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git download
30+
cd download
31+
mkdir -p talk
32+
cp ../C++Course.pdf "talk/C++Course_${{ matrix.version }}.pdf"
33+
git config --global user.name 'github-actions[bot]'
34+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
35+
git add -f "talk/C++Course_${{ matrix.version }}.pdf"
36+
if (git diff --quiet) || (git diff --staged --quiet)
37+
then
38+
git commit -m "Update C++Course_${{ matrix.version }}.pdf"
39+
while : ; do
40+
git pull --rebase origin download
41+
git push origin download
42+
[[ $1 != 0 ]] || break
43+
done
44+
else
45+
echo "No changes to commit"
46+
fi
47+
git push

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ C++Course.out
77
C++Course.snm
88
C++Course.toc
99
C++Course.vrb
10+
C++Course.xdv
1011
C++Course.pdf
1112
C++Course*.vrb
1213
C++Course.fdb_latexmk

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy