try using a CI
All checks were successful
/ test_checkout (push) Successful in 46s

This commit is contained in:
Jean-Marie Mineau 2025-06-25 11:52:27 +02:00
parent dd86422fd3
commit 71bd155f0f
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
3 changed files with 67 additions and 1 deletions

View file

@ -0,0 +1,26 @@
on: [push]
jobs:
test_checkout:
runs-on: docker
container:
image: ghcr.io/typst/typst:v0.13.1
steps:
- run: apk add --no-cache git curl
- run: |
mkdir -p ~/.local/share/typst/packages/local/template-thesis-matisse/
git clone https://git.mineau.eu/histausse/template-thesis-matisse.git ~/.local/share/typst/packages/local/template-thesis-matisse/0.0.1
- run: |
TOKEN=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64)
mkdir -p "${GITHUB_WORKSPACE}"
cd "${GITHUB_WORKSPACE}"
git init
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
git -c http.extraHeader="Authorization: Basic ${TOKEN}" fetch origin "${GITHUB_SHA}"
git checkout "${GITHUB_SHA}"
ls
- run: |
cd "${GITHUB_WORKSPACE}"
/bin/typst compile --input commit=$(git rev-parse --short HEAD) main.typ
- run: |
curl --user "histausse:${GITHUB_TOKEN}" -X DELETE "${GITHUB_SERVER_URL}/api/packages/histausse/generic/thesis/latest/draft.pdf"
curl --user "histausse:${GITHUB_TOKEN}" --upload-file "${GITHUB_WORKSPACE}/main.pdf" "${GITHUB_SERVER_URL}/api/packages/histausse/generic/thesis/latest/draft.pdf"

30
README.md Normal file
View file

@ -0,0 +1,30 @@
# Thesis Manuscript
By Jean-Marie Mineau, supervised by Jean-François Lalande and Valérie Viet Triem Tong, at CentraleSupélec, campus Rennes.
## Build
Currently build on [typst](https://github.com/typst/typst) 0.13.1.
To build, you need to install the template: https://git.mineau.eu/histausse/template-thesis-matisse
```
mkdir -p ~/.local/share/typst/packages/local/template-thesis-matisse/
git clone https://git.mineau.eu/histausse/template-thesis-matisse.git ~/.local/share/typst/packages/local/template-thesis-matisse/0.0.1
```
Alternatively, for easier access to the template:
```
mkdir -p ~/.local/share/typst/packages/local/template-thesis-matisse/
git clone https://git.mineau.eu/histausse/template-thesis-matisse.git
ln -s $(pwd)/template-thesis-matisse ~/.local/share/typst/packages/local/template-thesis-matisse/0.0.1
```
Then to build the manuscript:
```
typst compile main.typ
```
Additionally, the argument `--input commit=$(git rev-parse --short HEAD)` will add the current commit at the beginning of the draft, and `--input draft=false` will build the clean version, without TODOs or line numbers.

View file

@ -4,6 +4,16 @@
#import "abstract.typ": keywords-en, keywords-fr, abstract-en, abstract-fr
#import "0_preamble/notations.typ": *
#let draft = if "draft" in sys.inputs {
assert(
sys.inputs.draft == "true" or sys.inputs.draft == "false",
message: "If --input draft=<val> is set, <val> must be 'true', or 'false'"
)
sys.inputs.draft == "true"
} else {
true
}
#show: matisse-thesis.with(
title-fr: todo[Find a title],
title-en: todo[Find a title],
@ -17,7 +27,7 @@
keywords-fr: keywords-fr,
abstract-en: abstract-en,
abstract-fr: abstract-fr,
draft: true,
draft: draft,
)
// Preamble