change ls to find, pass mainfile name to latex
All checks were successful
/ Build Container (push) Successful in 57m39s

This commit is contained in:
2025-09-18 07:37:17 +05:30
parent 8df1c9a242
commit 2bea58ed38
4 changed files with 17 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
on: [push, pull_request]
jobs:
QC:
CD:
name: Build Container
runs-on: ubuntu-latest
steps:
@@ -9,13 +9,13 @@ jobs:
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_RW_PAT }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_RW_PAT }}
- uses: docker/build-push-action@v6
with:
context: .
push: true
tags: phanipavank/autoltx:latest
platforms: linux/arm64, linux/amd64
build-args: |
TARGETARCH=${{matrix.arch}}
context: .
push: true
tags: phanipavank/autoltx:latest
platforms: linux/arm64, linux/amd64
build-args: |
TARGETARCH=${{matrix.arch}}

View File

@@ -34,7 +34,8 @@ replace `<mainTEXfile>` with the primary tex file to compile, `<projectFolderP
This will compile your project whenever a change is observed in the `mainTEXfile` file.
## Observables:
- The container will create a new folder `pdf` which contains all the build files.
- Once the project compiles, the result is put into the `<projectFolderPath>`, called `output.pdf`. Keep it open so any changes to the main tex file, triggers a pdf update. Other files include `compile.sh`: the main compilation script, `latexmkrc`: used by the `latexmk` compiler, edit cautiously, and `.autoltx`: used for versioning the container scripts.
- These files are added to gitignore if present to avoid tracking unnecessary files by git.
- Compilation starts as soon as you start the container, and if the required files are present in the project folder.
- The container will create a new folder `pdf` to store all the build files.
- You can follow the compilation logs in the terminal for any errors or warnings.
- Once the project compiles, the resulting PDF ends up in the `<projectFolderPath>`, called `output.pdf`. Keep it open so any changes to the main tex file triggers a refresh by your PDF viewer. Other files include `compile.sh`: the main compilation script, `latexmkrc`: used by the `latexmk` compiler, edit cautiously, and `.autoltx`: used for versioning the container scripts.
- These files are added to gitignore to avoid tracking by git.

View File

@@ -8,7 +8,7 @@ mkdir -p pdf
# rm pdf/*
# fi
# latexmk -C
latexmk -pdf -jobname=pdf/output main.tex -f -quiet
latexmk -pdf -jobname=pdf/output $1 -f -quiet
# count=`ls -1 *.aux 2>/dev/null | wc -l`
# if [ $count != 0 ]
# then

View File

@@ -1,6 +1,6 @@
#! /bin/bash
echo Running as user: "$USER"
echo Running as user: $USER
if [[ -z ${1} ]]; then
echo Main file not spicified
@@ -26,4 +26,4 @@ fi
echo Starting AutoLTX...
sleep 3
cd /app/project || exit 2
ls "$1" | entr -n sh -c ./compile.sh
find ./* -name "*.tex" | entr -n sh -c "./compile.sh $1"