Add CI/CD
This commit is contained in:
parent
aef237e32f
commit
dbe17f7b13
51
.github/workflows/build.yml
vendored
Normal file
51
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
name: Render LaTeX and Publish Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install LaTeX
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y texlive-latex-base texlive-science texlive-latex-extra texlive-fonts-recommended latexmk
|
||||
|
||||
- name: Render LaTeX document
|
||||
run: latexmk -pdflua report.tex
|
||||
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H%M%S')"
|
||||
|
||||
- name: release
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
with:
|
||||
draft: false
|
||||
prerelease: false
|
||||
# Ref will be tag in this context
|
||||
release_name: ${{ github.ref }}
|
||||
tag_name: ${{ github.ref }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Upload assembled CV
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./cv.pdf
|
||||
asset_name: cv.pdf
|
||||
asset_content_type: application/pdf
|
||||
|
||||
Loading…
Reference in New Issue
Block a user