Skip to content

Commit

Permalink
Merge pull request #1 from mjpc13/implement-version-diff
Browse files Browse the repository at this point in the history
Produces a pdf showing the difference between current release and the last version
  • Loading branch information
mjpc13 authored Nov 29, 2022
2 parents 87ec43c + b0aef95 commit aa3abdf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 20 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/build_latex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,38 @@ jobs:
- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time

- uses: robinraju/[email protected]
with:
latest: true
fileName: "main.pdf"
tarBall: false
zipBall: false
out-file-path: "previous"
token: ${{ secrets.GITHUB_TOKEN }}

- uses: hidakatsuya/setup-diff-pdf@v1
if: always()
with:
diff-pdf-version: '0.5'
- name: Setup headless display
uses: pyvista/setup-headless-display-action@v1

- name: Compile the differences between versions
run: export NO_AT_BRIDGE=1 && diff-pdf -m --output-diff=diff.pdf main.pdf previous/main.pdf
- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: always()
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./main.pdf
asset_name: main.pdf
asset_content_type: application/pdf
name: Release ${{ github.ref }}
generate_release_notes: true
files: |
main.pdf
diff.pdf
- name: Generate dummy page
run: |
mkdir public
Expand Down
13 changes: 7 additions & 6 deletions chapters/sample.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ \section{Section}


\begin{equation}
c_{ij} = \alpha\sum_{l=1}^n a_{il}b_{lj}
c_{ij} = \alpha\sum_{l=1}^n A_{il}B_{lj}
\label{eq: naive matrix mult}
\end{equation}

Expand All @@ -21,14 +21,14 @@ \section{Section}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna1 aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

\subsection{Sub Section}
\subsection{Sub Section 1}

Lorem ipsum dolor sit amet, cons ectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

\begin{figure}[H]
\centering
\includegraphics[width=0.5\linewidth]{images/UC_logos/FCTUC_V_FundoClaro.png}
\caption{Example Image \cite{ExampleArticle}}
\includegraphics[width=0.5\linewidth]{images/UC_logos/UC_V_FundoClaro-negro.png}
\caption{Example Image \cite{ExampleArticle}.}
\label{fig: sample image}
\end{figure}

Expand All @@ -41,11 +41,12 @@ \subsubsection{Sub Sub Section}


\begin{lstlisting}[language=Python, caption= Sample code listing, label=lst: sample code,frame=tb]
import numpy as pd
import numpy as pd
import pandas as np

#A comment
while True:
print("Hello World")
print("Hello there!")
\end{lstlisting}

Lorem ipsum dolor sit amet, cons ectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Expand Down

0 comments on commit aa3abdf

Please sign in to comment.