Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .github/workflows/generateTestOER.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Regenerate course overview test

on:
repository_dispatch:
types: [new_version]
push:

env:
EXPORTFOLDER: 'assets'
REPOSITORYFOLDER: 'repository'

jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Check out current repository
uses: actions/checkout@v3
with:
path: repository

- name: Delete and redefine folder for exports
run: |
rm -rf ${REPOSITORYFOLDER}/${EXPORTFOLDER}
mkdir -p ${REPOSITORYFOLDER}/${EXPORTFOLDER}

- name: Cache repository
uses: actions/cache@v3
with:
path: repository
key: repository-${{ github.sha }}

run_index:
needs: prepare
runs-on: ubuntu-latest
steps:
- name: Restore repository
uses: actions/cache@v3
with:
path: repository
key: repository-${{ github.sha }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
# Removed npm cache that was causing failures

- name: Install LiaScript exporter
run: npm install -g @liascript/exporter

- name: Run exporter for index
run: |
cd ${REPOSITORYFOLDER}
liaex -i index.yml -o index --format project --project-category-blur

run_robotikprojekt:
needs: prepare
runs-on: ubuntu-latest
steps:
- name: Restore repository
uses: actions/cache@v3
with:
path: repository
key: repository-${{ github.sha }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
# Removed npm cache that was causing failures

- name: Install LiaScript exporter
run: npm install -g @liascript/exporter

- name: Run exporter for robotikprojekt
run: |
cd ${REPOSITORYFOLDER}
liaex -i robotikprojekt.yml -o robotikprojekt --format project --project-generate-cache --project-generate-pdf --project-category-blur


commit_changes:
needs:
[
run_index,
run_robotikprojekt,
]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Restore repository
uses: actions/cache@v3
with:
path: repository
key: repository-${{ github.sha }}

- name: Commit and push changes
run: |
cd ${REPOSITORYFOLDER}
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -am "Add new export version of courses" || echo "No changes to commit"
git push --all "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TUBAF-IfI-LiaScript.github.io

Course-Overview

Loading