diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3117740..aef6493 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,7 +3,7 @@ name: Build and release on: push: paths: - - '*.tex' + - 'src/*.tex' - '.github/workflows/release.yaml' env: @@ -50,7 +50,7 @@ jobs: - name: Install dependencies run: python -m pip install -r requirements.txt - - name: Create pdf + - name: Create PNG run: python -m pdf2png main.pdf main.png - name: Upload PNG @@ -91,7 +91,7 @@ jobs: name: "pngs" - name: Rename main.pdf to my name and current date - run: mv main.pdf "$my_name-$(date +'%Y-%m-%d' --utc).pdf" + run: mv build/main.pdf "$my_name-$(date +'%Y-%m-%d' --utc).pdf" - name: Release run: | diff --git a/Makefile b/Makefile index 6d0bccd..5b38fe9 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,14 @@ BUILD_DIR := ./build -BUILD_CMD := lualatex -halt-on-error -file-line-error -interaction=nonstopmode -output-directory=$(BUILD_DIR) +SRC_DIR := ./src PDFS := anon.pdf main.pdf .PHONY: all all: $(PDFS) -$(PDFS): %.pdf: main.tex +$(PDFS): %.pdf: $(SRC_DIR)/main.tex mkdir -p $(BUILD_DIR) - $(BUILD_CMD) $(basename $@ .tex) - cp $(BUILD_DIR)/$@ ./ + lualatex -halt-on-error -file-line-error -interaction=nonstopmode -output-directory=$(BUILD_DIR) $(SRC_DIR)/$(basename $@ .tex) .PHONY: clean clean: - rm -rf build - rm *.pdf + rm -rf $(BUILD_DIR) diff --git a/anon.tex b/anon.tex deleted file mode 100644 index 3e7b90d..0000000 --- a/anon.tex +++ /dev/null @@ -1,2 +0,0 @@ -\def\isanonymous{1} -\input{main.tex} diff --git a/src/anon.tex b/src/anon.tex new file mode 100644 index 0000000..5a06490 --- /dev/null +++ b/src/anon.tex @@ -0,0 +1,2 @@ +\def\isanonymous{1} +\input{src/main.tex} diff --git a/main.tex b/src/main.tex similarity index 100% rename from main.tex rename to src/main.tex