自从体验了 Github Actions,感觉非常好用。之前介绍过使用 Appveyor 来生成 PDF,现在介绍下使用 Github Actions 来生成 PDF,并发布到 release 的步骤。
例子如下:
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
| name: Build LaTeX
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest # 目前只能在linux下
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Build LaTeX
uses: xu-cheng/latex-action@v2
with:
root_file: fei.tex
latexmk_use_xelatex: true # 为了支持中文,使用xelatex
- name: Create GitHub release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: latest
prerelease: false
files:
filename.pdf # 生成的 pdf,发布到 release
|
Author
winsphinx
LastMod
2021-04-12
(21a009c4)
[原创] PDF w/ Github Actions
License
