TUM-LIS / tum-dissertation-latex

Latex template for a TUM dissertation/PhD thesis
Creative Commons Attribution 4.0 International
95 stars 48 forks source link

github action support #18

Closed SteffenSeckler closed 4 years ago

SteffenSeckler commented 4 years ago

Hi,

maybe it would be helpful for some people to document, how this code could be used with github actions:

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

# 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

    # Runs a single command using the runners shell
    # The checked-out repository is by default mounted as working directory.
    - name: Build
      uses: docker://andrerichter/tum-dissertation-latex
      with:
        entrypoint: make
        args: pdf-local
    # if your makefile is not in the root directory of your github repository, you can specify the path using make's -C argument:
    # args: -C PATH-TO-MAKEFILE-DIRECTORY pdf-local

    # Publish the artifacts, can be downloaded as zip.
    - name: Publish artifact
      uses: actions/upload-artifact@v1
      with:
        name: dissertation
        path: dissertation.pdf
andre-richter commented 4 years ago

Is this for people who write their dissertation openly and want to have it built by GitHub on each new push?

SteffenSeckler commented 4 years ago

this also works with private repositories on github ;) But yes, this would query a build on every push (or pull request)

it also makes the pdf available for download, even though somewhat hidden (you have to click on the latest action for that)...

SteffenSeckler commented 4 years ago

a very similar version should also be possible using gitlab-ci, which would be usable at lrz's gitlab servers (if you have setup some runners).

folixg commented 4 years ago

Gitlab CI config is already available in the repository. (#13)

andre-richter commented 4 years ago

Right, I always forget private repos exist on github...

Feel free to open a PR for the main Readme, we‘re happy to take it.

SteffenSeckler commented 4 years ago

Hi, two options for that:

  1. simply edit it in the readme
  2. add the file under .github/workflows, this would directly enable building, testing and publishing, even for this template. This, however, fails, as there is no inc/fak_placement.tex... One could provide a new fak_placement.tex, that just spells out "404 not found" or sth. similar.

Which option do you prefer?

andre-richter commented 4 years ago

I'd option 1. I do not see too much benefit in having an auto-built PDF that incorporates a 404 message, and we have a preview with actual logos already.

I'd suggest that we split the current chapter Auto build and publish dissertation into Gitlab and GitHub actions subsections.

By the way, are the logos still accessible in the places where the README references them? My TUM Alumni account doesn't have enough rights anymore to navigate there.

SteffenSeckler commented 4 years ago

ok, will do.

https://portal.mytum.de/corporatedesign/vorlagen/index_Logos is still valid, but I would remove the detailed list of resources at the bottom, as at least some are no longer valid.