mirror of
https://github.com/cupcakearmy/master-thesis.git
synced 2024-11-16 10:00:32 +01:00
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: 'CD'
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: thesis
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
lfs: true
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- uses: actions/cache@v3
|
|
name: Tectonic Cache
|
|
with:
|
|
path: ~/.cache/Tectonic
|
|
key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-tectonic-
|
|
- uses: wtfjoke/setup-tectonic@v2
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Run Tectonic
|
|
run: make build
|
|
- name: Upload PDFs
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: PDFs
|
|
path: 'thesis/Thesis.pdf'
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
needs:
|
|
- build
|
|
steps:
|
|
- name: Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
allowUpdates: true
|
|
artifacts: 'thesis/Thesis.pdf'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|