Skip to content

Update Kleinigkeiten und Aktualisierungen #840

Update Kleinigkeiten und Aktualisierungen

Update Kleinigkeiten und Aktualisierungen #840

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# GITLAB_PRIVATE_ACCESS: Access token for private GitLab repository
- name: Checkout private repository
env:
GITLAB_PRIVATE_ACCESS: ${{ secrets.GITLAB_PRIVATE_ACCESS }}
run: |
cd $GITHUB_WORKSPACE
git clone https://oauth2:[email protected]/s_may006/ersti-fibel_private.git private
- name: Run pdflatex
run: |
docker run --rm -t -v $GITHUB_WORKSPACE:/mounted -w /mounted texlive/texlive:TL2021-historic latexmk -pdf -halt-on-error fibel.tex
- name: Install Ghostscript
run: |
sudo apt update
sudo apt install ghostscript
- name: Post-process tex file
run: ./create_print_version.sh && ./create_web_version.sh
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Add REF_NAME env property with commit short sha
run: echo "REF_NAME=`echo ${GITHUB_REF_NAME} | sed 's/[^a-zA-Z0-9]//g'`" >> $GITHUB_ENV
- name: Add HEAD_NAME env property with commit short sha
run: echo "HEAD_NAME=`echo ${GITHUB_HEAD_REF} | sed 's/[^a-zA-Z0-9]//g'`" >> $GITHUB_ENV
# SCIEBO_SHARELINK_ID: Part in shared link after .de/s/
- name: Upload result
env:
SCIEBO_SHARELINK_ID: ${{ secrets.SCIEBO_SHARELINK_ID }}
run: |
for f in *.pdf;
do
/usr/bin/curl -u $SCIEBO_SHARELINK_ID: -X PUT -T ./$f https://uni-muenster.sciebo.de/public.php/webdav/$(basename $f .pdf)-${HEAD_NAME}-${REF_NAME}-${SHORT_SHA}.pdf
done
- name: Log comment
run: |
echo Files successfully compiled
echo HEAD: ${HEAD_NAME}
echo REF: ${REF_NAME}
echo SHA: ${SHORT_SHA}