diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..b0ad403 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,21 @@ +name: Build pdf + +on: + pull_request: + +permissions: + contents: write + +jobs: + build-pdf: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: '0' + - name: Compile LaTeX document + uses: xu-cheng/latex-action@v2 + with: + root_file: src/template.tex + args: -pdf -shell-escape -interaction=nonstopmode -output-directory=.build diff --git a/.github/workflows/build.yml b/.github/workflows/release.yaml similarity index 97% rename from .github/workflows/build.yml rename to .github/workflows/release.yaml index 28922e9..d20ba0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: Build and release thesis +name: Build and release pdf on: push: @@ -9,7 +9,7 @@ permissions: contents: write jobs: - build-pdf: + release-pdf: runs-on: ubuntu-latest steps: - name: Checkout diff --git a/README.md b/README.md new file mode 100644 index 0000000..fc96156 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +## assignment-template-latex + +This repository provides a simple LaTeX template for writing your Assignments at UiT (The Arctic University of Norway). + +> [!NOTE] +> This is only a template. You have to adapt the template to your current assignment! + +## Usage + +### Build PDFs locally + +Once you have installed [LaTeX](https://www.latex-project.org/), you can use it like this: + +```console +# Creates `template.pdf` in working directory. +make +``` + +Clean temp files: + +```console +# Removes the temp files inside `build/` +make clean +``` + +## Build and release a PDF automatically + +The project uses GitHub Actions to build the LaTeX document and create a release on GitHub automatically. To trigger a build, create a new release. The release will be tagged with the version number, and the PDF will be attached to the release. + +## Credits + +This template is using the [IEEEtran](https://www.ieee.org/conferences/publishing/templates.html) `cls` file. \ No newline at end of file diff --git a/src/README.md b/src/README.md index 691c738..7b3028b 100644 --- a/src/README.md +++ b/src/README.md @@ -13,7 +13,7 @@ Once you have installed [LaTeX](https://www.latex-project.org/), you can use it ```console # Creates `template.pdf` in working directory. -make all +make ``` Clean temp files: