[CI] Add automated upload of summaries to comsol

This commit is contained in:
2025-12-31 10:32:00 +01:00
parent 432a3ea37c
commit 73412cfb08
4 changed files with 41 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
name: Upload to ComSol
description: Upload documents to VIS ComSol
author: Janis Hutz
inputs:
file:
description: File to upload
access_token:
description: Access token for the file on ComSol
url:
description: The upload URL as shown in the access token details page on ComSol
runs:
using: composite
steps:
- name: Upload file to ComSol
run: |
curl {{ inputs.url }} \
-H "Authorization: {{ inputs.access_token }}" \
-F "file=@{{ inputs.file }}"
branding:
icon: book
color: red

17
.github/workflows/upload-ad.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Upload Algorithms and Datastructures Summary
on:
push:
paths:
- 'semester1/algorithms-and-datastructures/**'
jobs:
build_docs:
runs_on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v6
- name: Upload to ComSol
uses: ./.github/actions/upload-to-comsol
with:
access_token: {{ secrets.TOKEN_AD }}
file: ./semester1/algorithms-and-datastructures/ad-janishutz.pdf
url: https://exams.vis.ethz.ch/api/document/jahutz/summary-hs24_1/files/591/update/