26 lines
1.2 KiB
YAML
26 lines
1.2 KiB
YAML
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"
|