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"
|
Loading…
Add table
Add a link
Reference in a new issue