File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name: Build book
2+
3+ # Controls when the workflow will run
4+ on:
5+ # Triggers the workflow on push or pull request events but only for the "master" branch
6+ push:
7+ branches: [ "master" ]
8+
9+ # Allows you to run this workflow manually from the Actions tab
10+ workflow_dispatch:
11+
12+ jobs:
13+ extract:
14+ runs-on: ubuntu-latest
15+
16+ steps:
17+ # Runs a set of commands using the runners shell
18+ - name: Run a multi-line script
19+ run: |
20+ # Clone autogen repository (target for the file)
21+ git clone https://gcarcassi:${{ secrets.AUTOGEN_TOKEN }}@github.com/assumptionsofphysics/autogen autogen
22+ # Output the directory contents for debugging
23+ ls -l
24+ # Use latexonline to build latest version
25+ cd autogen
26+ curl "https://latexonline.cc/compile?git=https%3A%2F%2Fgithub.com%2Fassumptionsofphysics%2Fbook&target=book.tex&command=pdflatex&trackId=1505754735843" -o AssumptionsOfPhysicsDraft.pdf
27+ ls -l
28+ git add AssumptionsOfPhysicsDraft.pdf
29+ # Commit and push only if there were changes
30+ if ! git diff --cached --quiet; then
31+ git config user.name "gcarcassi[bot]"
32+ git config user.email "gabriele.carcassi@gmail.com"
33+ git commit -m "Updating book draft"
34+ git push
35+ else
36+ echo "No changes to commit."
37+ fi
You can’t perform that action at this time.
0 commit comments