diff --git a/.github/workflows/buildAndRelease.yml b/.github/workflows/buildAndRelease.yml index 48863f6..49d7997 100644 --- a/.github/workflows/buildAndRelease.yml +++ b/.github/workflows/buildAndRelease.yml @@ -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" @@ -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 }}/src/build/build/main.log if-no-files-found: warn retention-days: 1 compression-level: 0 @@ -56,7 +56,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: Compiled PDF - path: /build/Appunti-LFC.pdf + path: ${{ github.workspace }}/src/build/Appunti-LFC.pdf if-no-files-found: error retention-days: 1 compression-level: 0 @@ -83,12 +83,12 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: /build/Appunti-LFC.pdf + file: ${{ github.workspace }}/src/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' @@ -96,7 +96,7 @@ jobs: 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