-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.1 KB
/
pdf-gen.yml
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
41
42
43
44
45
46
name: Build LaTeX document
on:
workflow_dispatch:
pull_request:
types:
- closed
branches:
- main
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
work_in_root_file_dir: true
root_file: spec.tex
- name: Upload documents
uses: actions/upload-artifact@v3
with:
name: Hybrid Control System Packet Format
path: spec.pdf
- name: Generate PDF page
run: |
mkdir pdfs
cp spec.pdf pdfs/
cat > pdfs/index.html <<EOL
<!doctype html>
<html>
<head>
<title>File Browser</title>
</head>
<body>
</body>
</html>
EOL
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: pdfs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}