This commit is contained in:
parent
dd86422fd3
commit
71bd155f0f
3 changed files with 67 additions and 1 deletions
26
.forgejo/workflows/publish.yaml
Normal file
26
.forgejo/workflows/publish.yaml
Normal 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
30
README.md
Normal 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.
|
12
main.typ
12
main.typ
|
@ -4,6 +4,16 @@
|
||||||
#import "abstract.typ": keywords-en, keywords-fr, abstract-en, abstract-fr
|
#import "abstract.typ": keywords-en, keywords-fr, abstract-en, abstract-fr
|
||||||
#import "0_preamble/notations.typ": *
|
#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(
|
#show: matisse-thesis.with(
|
||||||
title-fr: todo[Find a title],
|
title-fr: todo[Find a title],
|
||||||
title-en: todo[Find a title],
|
title-en: todo[Find a title],
|
||||||
|
@ -17,7 +27,7 @@
|
||||||
keywords-fr: keywords-fr,
|
keywords-fr: keywords-fr,
|
||||||
abstract-en: abstract-en,
|
abstract-en: abstract-en,
|
||||||
abstract-fr: abstract-fr,
|
abstract-fr: abstract-fr,
|
||||||
draft: true,
|
draft: draft,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Preamble
|
// Preamble
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue