membership-application/.gitea/workflows/action.yml

49 lines
1.0 KiB
YAML
Raw Normal View History

2024-02-26 11:23:24 +01:00
name: Compile LaTeX document
on:
push:
branches:
- main # or any other branch you want to trigger the workflow
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
container:
2024-02-26 11:27:33 +01:00
image: leplusorg/latex
2024-02-26 11:23:24 +01:00
2024-02-26 11:38:18 +01:00
2024-02-26 11:23:24 +01:00
steps:
2024-02-26 11:38:18 +01:00
- name: "Determine prerequisites"
id: prereq
run: |
echo "need_node=$(command -v node >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
- name: Install node
if: ${{ steps.prereq.outputs.need_node == '1' }}
run: |
2024-02-26 11:39:19 +01:00
apt install -y curl
2024-02-26 11:38:18 +01:00
curl -sS https://webi.sh/node | sh
echo ~/.local/opt/node/bin >> $GITHUB_PATH
2024-02-26 11:23:24 +01:00
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Compile LaTeX Document
run: latexmk -pdf -output-directory=/github/workspace ${{ env.root_file }}
env:
root_file: main.tex # Replace 'main.tex' with the path to your main LaTeX file
- name: Upload PDF
uses: actions/upload-artifact@v3
with:
name: Compiled-PDF
path: ./*.pdf