mirror of
https://github.com/cupcakearmy/master-thesis.git
synced 2025-09-06 02:30:43 +00:00
Clear History
This commit is contained in:
55
.github/workflows/cd.yaml
vendored
Normal file
55
.github/workflows/cd.yaml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
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 }}
|
Reference in New Issue
Block a user