All checks were successful
Compile LaTeX and Release PDF / build_latex (push) Successful in 51s
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: Compile LaTeX and Release PDF
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build_latex:
|
|
runs-on: [docker] # Use your Forgejo runner with the 'docker' label
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
services:
|
|
docker:
|
|
image: docker:19.03.12-dind
|
|
options: --privileged
|
|
steps:
|
|
- name: Set up Git repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
token: ${{ secrets.RELEASE_TOKEN }} # Use RELEASE_TOKEN instead of GITHUB_TOKEN
|
|
|
|
- name: Install LaTeX
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y texlive texlive-latex-extra texlive-fonts-recommended
|
|
|
|
# Step 3: Create build directory
|
|
- name: Create dist directory
|
|
run: |
|
|
mkdir -p dist
|
|
|
|
# Step 3: Compile the LaTeX document (replace 'document.tex' with your actual file name)
|
|
- name: Compile LaTeX document
|
|
run: |
|
|
pdflatex -output-directory=dist main.tex # Output PDF to 'build' folder
|
|
|
|
# Step 4: Upload the compiled PDF as a release asset
|
|
- name: Upload PDF to Release
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: main.pdf # The file to upload as the release asset
|
|
path: dist/main.pdf # Path to the compiled PDF
|
|
|
|
- name: Create release
|
|
uses: actions/forgejo-release@v2
|
|
with:
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
|
release-dir: dist
|
|
direction: upload
|
|
url: https://git.leomurca.xyz
|
|
repo: leomurca/resume
|
|
title: "New release!"
|
|
release-notes: "MY RELEASE NOTES"
|
|
|