Skip to content

Commit

Permalink
Generalizzata cartella di build
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostWalk committed Jan 16, 2024
1 parent 1d74feb commit e2d6145
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/buildAndRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
shell: bash
run: |
cd src/
rm -rf /build
mkdir /build
rm -rf ${GITHUB_WORKSPACE}/build
mkdir ${GITHUB_WORKSPACE}/build
# compile the main file
pdflatex -quiet -shell-escape -synctex=1 -interaction=nonstopmode -file-line-error main.tex > /dev/null 2>&1
echo "First build done"
Expand All @@ -37,15 +37,15 @@ jobs:
# compile a third time to adjust layout
pdflatex -quiet -shell-escape -synctex=1 -interaction=nonstopmode -file-line-error main.tex > /dev/null 2>&1
echo "Third build done"
mv ./main.log /build/main.log
mv ./main.pdf /build/Appunti-LFC.pdf
mv ./main.log ${GITHUB_WORKSPACE}/build/main.log
mv ./main.pdf ${GITHUB_WORKSPACE}/build/Appunti-LFC.pdf
- name: Upload Log
id: uplaodLog
uses: actions/upload-artifact@v4
with:
name: LaTeX build logs
path: /build/main.log
path: ${{ github.workspace }}/build/build/main.log
if-no-files-found: warn
retention-days: 1
compression-level: 0
Expand All @@ -56,7 +56,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Compiled PDF
path: /build/Appunti-LFC.pdf
path: ${{ github.workspace }}/build/Appunti-LFC.pdf
if-no-files-found: error
retention-days: 1
compression-level: 0
Expand All @@ -83,20 +83,20 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /build/Appunti-LFC.pdf
file: ${{ github.workspace }}/build/Appunti-LFC.pdf
asset_name: Appunti-LFC.pdf
overwrite: true
body: "Appunti di Linguaggi Formali e Compilatori - Prof.ssa P. Quaglia - Università di Trento"
release_name: "Appunti di Linguaggi Formali e Compilatori"

- name: Upload pdf to lfc repo
id: uploadPdfToLfcRepo
if: github.ref == 'refs/heads/master' && steps.compile.outcome == 'success'
shell: bash
run: |
git clone https://${{ secrets.PDF_TOKEN }}@github.com/unitn-drive/linguaggi-formali-e-compilatori.git tmp
cd tmp/Appunti/
cp /build/Appunti-LFC.pdf ./Dispensa-Studenti.pdf
cp ${GITHUB_WORKSPACE}/build/Appunti-LFC.pdf ./Dispensa-Studenti.pdf
git config user.email "unitn.drive@gmail.com"
git config user.name "unitnDrive"
git add --all
Expand Down

0 comments on commit e2d6145

Please sign in to comment.