From 6bc17c3711c890c865d3068b2b5b13e054981d1e Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 22 Feb 2024 10:20:17 +0100 Subject: [PATCH 1/4] docs: update and move to src --- README.md | 32 ++++++++++++++++++++++++++++++++ src/README.md | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 README.md 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: From 7bd7225cc19168b5a6d1d209c355a6a3c2fa1404 Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 22 Feb 2024 10:20:26 +0100 Subject: [PATCH 2/4] ci: seperate build and release --- .github/workflows/build.yaml | 21 +++++++++++++++++++ .github/workflows/{build.yml => release.yaml} | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yaml rename .github/workflows/{build.yml => release.yaml} (97%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..524f758 --- /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: template.tex + args: -pdf -shell-escape -interaction=nonstopmode -output-directory=build \ No newline at end of file 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 From d526839bbd7faa8135ed987ac0b6ad564079d96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20J=C3=B6rg?= <14005567+mrtz-j@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:07:36 +0100 Subject: [PATCH 3/4] fix: correct path --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 524f758..e341998 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,5 +17,5 @@ jobs: - name: Compile LaTeX document uses: xu-cheng/latex-action@v2 with: - root_file: template.tex - args: -pdf -shell-escape -interaction=nonstopmode -output-directory=build \ No newline at end of file + root_file: src/template.tex + args: -pdf -shell-escape -interaction=nonstopmode -output-directory=build From c67c55f54e60c8ab0301c5aa63bac387d234f434 Mon Sep 17 00:00:00 2001 From: Nohr Date: Tue, 27 Aug 2024 16:22:12 +0200 Subject: [PATCH 4/4] Update build.yaml hidden build dir --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e341998..b0ad403 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,4 +18,4 @@ jobs: uses: xu-cheng/latex-action@v2 with: root_file: src/template.tex - args: -pdf -shell-escape -interaction=nonstopmode -output-directory=build + args: -pdf -shell-escape -interaction=nonstopmode -output-directory=.build