Skip to content

Commit 79be62e

Browse files
committed
ADDED: base files
1 parent 3f47b5b commit 79be62e

File tree

7 files changed

+105
-0
lines changed

7 files changed

+105
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build LaTeX Docs & Release
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
paths:
7+
- "docs/**"
8+
- "includes/**"
9+
- "Makefile"
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Install LaTeX
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y \
28+
make \
29+
texlive-latex-base \
30+
texlive-latex-recommended \
31+
texlive-latex-extra \
32+
texlive-fonts-recommended
33+
34+
- name: Build PDF documentation
35+
run: make
36+
37+
- name: Generate incremental tag
38+
id: tag
39+
run: |
40+
git fetch --tags
41+
LAST_TAG=$(git tag --list 'v*' --sort=-v:refname | head -n 1)
42+
43+
if [ -z "$LAST_TAG" ]; then
44+
NEXT_TAG="v1"
45+
else
46+
NUM=${LAST_TAG#v}
47+
NEXT_TAG="v$((NUM+1))"
48+
fi
49+
50+
git tag "$NEXT_TAG"
51+
git push origin "$NEXT_TAG"
52+
echo "tag=$NEXT_TAG" >> $GITHUB_OUTPUT
53+
54+
- name: Create GitHub Release
55+
uses: softprops/action-gh-release@v2
56+
with:
57+
tag_name: ${{ steps.tag.outputs.tag }}
58+
name: Documentation ${{ steps.tag.outputs.tag }}
59+
files: build/pdf/*.pdf

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,8 @@ TSWLatexianTemp*
324324
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
325325
# Uncomment the next line to have this generated file ignored.
326326
#*Notes.bib
327+
328+
329+
# Own gitignore rules
330+
*.pdf
331+
.idea

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# =========================
2+
# Configuration
3+
# =========================
4+
DOC_NAME := main
5+
TEX_DIR := docs
6+
BUILD_DIR := build
7+
8+
LATEX := pdflatex
9+
LATEX_FLAGS := -interaction=nonstopmode -halt-on-error
10+
11+
# =========================
12+
# Targets
13+
# =========================
14+
.PHONY: all pdf clean
15+
16+
all: pdf
17+
18+
pdf:
19+
mkdir -p $(BUILD_DIR)
20+
$(LATEX) $(LATEX_FLAGS) -output-directory=$(BUILD_DIR) $(TEX_DIR)/$(DOC_NAME).tex
21+
$(LATEX) $(LATEX_FLAGS) -output-directory=$(BUILD_DIR) $(TEX_DIR)/$(DOC_NAME).tex
22+
23+
clean:
24+
rm -rf $(BUILD_DIR)

docs/intro.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Intro

docs/main.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
\documentclass{article}
2+
3+
\input{includes/preamble}
4+
\input{includes/macros}
5+
6+
\begin{document}
7+
8+
Hola
9+
\input{docs/intro}
10+
11+
\end{document}

includes/macros.tex

Whitespace-only changes.

includes/preamble.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
\usepackage[utf8]{inputenc}
2+
\usepackage[T1]{fontenc}
3+
\usepackage{lmodern}
4+
\usepackage{graphicx}
5+
\usepackage{hyperref}

0 commit comments

Comments
 (0)