generated from AAU-Dat/project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new workflow for compiling report and adding it to repository (#19)
- Loading branch information
1 parent
a4c8561
commit d8ec0b8
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Compile PDF | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 12 * * 3" | ||
|
||
jobs: | ||
compile-pdf: | ||
name: Compile PDF with texlive image | ||
runs-on: ubuntu-latest | ||
container: | ||
image: texlive/texlive:latest | ||
defaults: | ||
run: | ||
working-directory: ./report/src | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Compile pdf | ||
run: | | ||
pdflatex -file-line-error -interaction=nonstopmode -synctex=0 -output-format=pdf -shell-escape main.tex | ||
biber main | ||
makeglossaries main | ||
pdflatex -file-line-error -interaction=nonstopmode -synctex=0 -output-format=pdf -shell-escape main.tex | ||
pdflatex -file-line-error -interaction=nonstopmode -synctex=0 -output-format=pdf -shell-escape main.tex | ||
- name: Upload pdf artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: report | ||
path: ./report/src/main.pdf | ||
retention-days: 5 | ||
|
||
push-to-repository: | ||
name: Push PDF to repository in the docs folder | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Download PDF | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: report | ||
path: ./docs | ||
- name: Push to repository | ||
run: | | ||
git add ./docs | ||
git commit -m "Added by compile-pdf GitHub Action" | ||
git push | ||
# deploy: | ||
# needs: compile-pdf | ||
# name: Deploy pdf to GitHub Pages | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Deploy to GitHub Pages | ||
# uses: actions/ |