Files
cv/.gitea/workflows/main.yaml
Nikolaos Karaolidis 2ee04c56f7
Some checks failed
Build and Release PDF / build (push) Failing after 2m38s
Build and Release PDF / release (push) Has been skipped
Update CI
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-07-31 13:47:35 +01:00

66 lines
2.1 KiB
YAML

name: Build and Release PDF
on:
push:
branches:
- "**"
jobs:
build:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.set-tag.outputs.tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install LaTeX (XeLaTeX)
run: |
apt-get update
apt-get install -y texlive-xetex texlive-science texlive-fonts-extra
mkdir -p /usr/local/share/fonts/cormorantgaramond
wget -P /usr/local/share/fonts/cormorantgaramond https://github.com/google/fonts/raw/main/ofl/cormorantgaramond/CormorantGaramond-Regular.ttf
wget -P /usr/local/share/fonts/cormorantgaramond https://github.com/google/fonts/raw/main/ofl/cormorantgaramond/CormorantGaramond-Bold.ttf
wget -P /usr/local/share/fonts/cormorantgaramond https://github.com/google/fonts/raw/main/ofl/cormorantgaramond/CormorantGaramond-Italic.ttf
wget -P /usr/local/share/fonts/cormorantgaramond https://github.com/google/fonts/raw/main/ofl/cormorantgaramond/CormorantGaramond-BoldItalic.ttf
wget -P /usr/local/share/fonts/cormorantgaramond https://github.com/google/fonts/raw/main/ofl/cormorantgaramond/CormorantGaramond-Light.ttf
fc-cache -fv
- name: Compile PDF
run: |
xelatex main.tex
- name: Set tag output
id: set-tag
run: echo "tag=release-${{ env.GITHUB_SHA }}" >> $GITHUB_OUTPUT
- name: Upload PDF Artifact
uses: actions/upload-artifact@v3
with:
name: main-pdf
path: main.pdf
retention-days: 1
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download PDF Artifact
uses: actions/download-artifact@v3
with:
name: main-pdf
path: .
- name: Create Gitea Release
uses: https://gitea.com/actions/release-action@main
with:
api_key: "${{ secrets.RELEASE_TOKEN }}"
tag: ${{ needs.build.outputs.tag }}
files: |
main.pdf