Skip to content

Vorlesung 16.02

Vorlesung 16.02 #55

Workflow file for this run

name: Put pdf on website
on:
# Triggers the workflow on push or pull request events but only for the built branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab whyyy
workflow_dispatch:
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set Up Git Repository
uses: actions/checkout@v2
- name: Compile LaTeX Document
uses: xu-cheng/latex-action@v2
with:
root_file: main.tex
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: pdfs
path: "*.pdf"
- name: Copy my folder
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git fetch # fetch branches
git checkout gh-pages # checkout to your branch
cp main.pdf algebra.pdf
git add algebra.pdf
git diff-index --quiet HEAD || git commit -am "deploy files" # commit to the repository (ignore if no modification)
git push origin gh-pages # push to remote branch