Skip to content

Commit

Permalink
Separate CI and move docs to root (#5)
Browse files Browse the repository at this point in the history
* docs: update and move to src

* ci: seperate build and release

* fix: correct path

* Update build.yaml

hidden build dir

---------

Co-authored-by: Nohr <[email protected]>
  • Loading branch information
mrtz-j and nohr-ai authored Aug 27, 2024
1 parent a0d4395 commit 4493c00
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and release thesis
name: Build and release pdf

on:
push:
Expand All @@ -9,7 +9,7 @@ permissions:
contents: write

jobs:
build-pdf:
release-pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4493c00

Please sign in to comment.