-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1022 Bytes
/
main.yaml
File metadata and controls
32 lines (30 loc) · 1022 Bytes
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
name: Latexdiff
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
paths: # 这里是用来指定哪个文件更改,才会触发的
- '*.tex'
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: generating diff.tex
uses: addnab/docker-run-action@v3
with:
image: 18810919727/latex_diff:v1
options: -v ${{ github.workspace }}:/dir:rw
run: |
latexdiff /dir/cag-template_old.tex /dir/cag-template.tex > /dir/diff.tex
echo "Generating diff.tex successfully"
- name: git add & commit
run: |
# 此处可以键入邮箱及姓名
git config --global user.email "you@example.com"
git config --global user.name "Your Named"
git add diff.tex
git commit -m "update diff"
git push -u origin main