File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ C++Course.out
7
7
C++Course.snm
8
8
C++Course.toc
9
9
C++Course.vrb
10
+ C++Course.xdv
10
11
C++Course.pdf
11
12
C++Course * .vrb
12
13
C++Course.fdb_latexmk
You can’t perform that action at this time.
0 commit comments