Skip to content

Commit

Permalink
Add GitHub Actions workflow for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
valentjn committed Feb 12, 2021
1 parent 91d7bed commit d0c6f9d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 3 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: "CI"

on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "develop"
workflow_dispatch:

jobs:
build:
name: "CI - Build Job"
runs-on: "ubuntu-20.04"

steps:
- name: "Checkout Repository"
uses: "actions/checkout@v2"

- name: "Install Ubuntu Packages"
run: "sudo apt-get update && sudo apt-get -y install scons texlive-latex-extra"

- name: "Build with SCons"
run: "scons"

- name: "Create GitHub Release"
id: "create_github_release"
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
uses: "actions/create-release@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
tag_name: "${{ github.ref }}"

- name: "Upload Slides to GitHub Release"
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
uses: "actions/upload-release-asset@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
asset_content_type: "application/pdf"
asset_name: "talk.pdf"
asset_path: "tex/talk.pdf"
upload_url: "${{ steps.create_github_release.outputs.upload_url }}"

- name: "Upload Handout to GitHub Release"
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
uses: "actions/upload-release-asset@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
asset_content_type: "application/pdf"
asset_name: "handout.pdf"
asset_path: "tex/handout.pdf"
upload_url: "${{ steps.create_github_release.outputs.upload_url }}"
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ The directory `tex` contains L<sup>A</sup>T<sub>E</sub>X source code
and resulting PDFs, while `gfx` contains graphics.
The main component of the template is the new Beamer theme "Stuttgart",
located in `tex/beamerthemeStuttgart.sty`.
Also included is an example presentation in `tex/talk.pdf`
(L<sup>A</sup>T<sub>E</sub>X source in
`tex/talk.tex` and `tex/slides.tex`).
Also included is an example presentation in
`tex/talk.tex` and `tex/slides.tex`.
See how it looks by downloading the PDFs in the latest
[release on GitHub](https://github.com/valentjn/uni-stuttgart-beamer-template/releases/latest).

### SCons

Expand Down

0 comments on commit d0c6f9d

Please sign in to comment.