Skip to content

Commit

Permalink
Add ability to build the thesis in Github (#3)
Browse files Browse the repository at this point in the history
This adds a configuration for using Github actions to build the thesis in the cloud (on Github).
  • Loading branch information
agude authored May 26, 2020
1 parent 2bb4f82 commit 17e3f30
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 13 deletions.
Binary file added .github/images/actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/artifact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Install the required packages
run: sudo apt-get install texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-pictures texlive-science
- name: Build the Thesis
run: make
- uses: actions/upload-artifact@master
with:
name: Compiled Thesis
path: ./thesis_masters.pdf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Session.vim
##Github Linux Ignore
.*
!.gitignore
!.github
*~

##Github Archives Ignore
Expand Down
48 changes: 35 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@ This repository contains an updated version of the UMN PhD Thesis Template.

## Prerequisites

On Ubuntu 14.04 you will need to enable the `universe` repository. You can do
this by opening the "Ubuntu Software Center", then following "Edit > Software
Sources > Ubuntu Software Tab > check the box for 'Community-maintained free
and open-source software (universe)'", or by running the code below:
### Build Locally

```bash
# Enable the univerese repo
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
```

You can then install the packages needed to compile the template:
To build the thesis locally, on Ubuntu 18.04, you will need to install:

```bash
# Install the required packages
Expand All @@ -26,7 +18,37 @@ texlive-pictures \
texlive-science \
```

## `cleveref`
### Build On Github

The easiest way to build the PDF is to use [Github Actions][actions]. This
will build the thesis and produce a PDF all within Github. The repository
already contains the correct configuration files, but you will need to enable
actions in Github.

[actions]: https://help.github.com/en/actions

Once this is done, you can click on the _"Actions"_ tab at the top of the
repository on Github.

<img
src="https://raw.githubusercontent.com/agude/UMN-PhD-Thesis-Template/feature-github_actions/.github/images/actions.png?raw=true"
width="800" alt="Actions page"/>

There you'll see a list of build jobs. The ones with green check marks have
completed successfully. Clicking on one will bring you to the build page,
where there will be a section titled **Artifacts**. Click on "Compiled Thesis"
to download a zip file containing the PDF.

<img
src="https://raw.githubusercontent.com/agude/UMN-PhD-Thesis-Template/feature-github_actions/.github/images/artifact.png?raw=true"
width="800" alt="Artifact download"/>

## Additional Packages

The thesis template comes with some useful additional packages. They are
described below.

### `cleveref`

[`cleveref`](https://www.ctan.org/pkg/cleveref?lang=en) is a package designed
to make cross referencing easier. Unlike `\ref`, `\cref` automatically adds
Expand All @@ -51,7 +73,7 @@ instead of "figures 1, 2 and 3".
Additionally, the package is passed the option `noabbrev` which causes it to
print the full prefix instead of an abbreviation ("figure" vs "fig.").

## `SIunitx`
### `SIunitx`

[`SIunitx`](https://www.ctan.org/pkg/siunitx?lang=en) formats SI units. It
provides the `\SI{}` command, which is used as follows:
Expand Down Expand Up @@ -95,7 +117,7 @@ The way in which units are displayed can also be redefined, as has been done
\DeclareSIUnit\electronvolt{e\hspace{-0.08em}V}
```

## `booktabs`
### `booktabs`

[`booktabs`](https://www.ctan.org/pkg/booktabs?lang=en) adds options to make
nicer tables. It defines `\toprule`, `\midrule`, and `\bottomrule` which add
Expand Down

0 comments on commit 17e3f30

Please sign in to comment.