-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (35 loc) · 1.06 KB
/
report-docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Report Documentation
on:
push:
branches:
- main
paths:
- 'docs/edmaths-docs.tex'
workflow_dispatch:
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: docs/edmaths-docs.tex
args: "-pdf -file-line-error -halt-on-error -interaction=nonstopmode"
- name: Commit PDF to gh-pages
run: |
mkdir build
mv edmaths-docs.pdf build/
git fetch --all
git checkout --track origin/gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
cp build/edmaths-docs.pdf .
git add ./edmaths-docs.pdf
git commit -m "Update edmaths documentation"
- name: Push changes to gh-pages
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages