change ls to find, pass mainfile name to latex
All checks were successful
/ Build Container (push) Successful in 57m39s
All checks were successful
/ Build Container (push) Successful in 57m39s
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
QC:
|
CD:
|
||||||
name: Build Container
|
name: Build Container
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -9,13 +9,13 @@ jobs:
|
|||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
- uses: docker/login-action@v3
|
- uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_RW_PAT }}
|
password: ${{ secrets.DOCKERHUB_RW_PAT }}
|
||||||
- uses: docker/build-push-action@v6
|
- uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: phanipavank/autoltx:latest
|
tags: phanipavank/autoltx:latest
|
||||||
platforms: linux/arm64, linux/amd64
|
platforms: linux/arm64, linux/amd64
|
||||||
build-args: |
|
build-args: |
|
||||||
TARGETARCH=${{matrix.arch}}
|
TARGETARCH=${{matrix.arch}}
|
||||||
|
|||||||
@@ -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.
|
This will compile your project whenever a change is observed in the `mainTEXfile` file.
|
||||||
|
|
||||||
## Observables:
|
## Observables:
|
||||||
|
- 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` which contains all the build files.
|
- The container will create a new folder `pdf` to store 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.
|
- You can follow the compilation logs in the terminal for any errors or warnings.
|
||||||
- These files are added to gitignore if present to avoid tracking unnecessary files by git.
|
- 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.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ mkdir -p pdf
|
|||||||
# rm pdf/*
|
# rm pdf/*
|
||||||
# fi
|
# fi
|
||||||
# latexmk -C
|
# 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`
|
# count=`ls -1 *.aux 2>/dev/null | wc -l`
|
||||||
# if [ $count != 0 ]
|
# if [ $count != 0 ]
|
||||||
# then
|
# then
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
echo Running as user: "$USER"
|
echo Running as user: $USER
|
||||||
|
|
||||||
if [[ -z ${1} ]]; then
|
if [[ -z ${1} ]]; then
|
||||||
echo Main file not spicified
|
echo Main file not spicified
|
||||||
@@ -26,4 +26,4 @@ fi
|
|||||||
echo Starting AutoLTX...
|
echo Starting AutoLTX...
|
||||||
sleep 3
|
sleep 3
|
||||||
cd /app/project || exit 2
|
cd /app/project || exit 2
|
||||||
ls "$1" | entr -n sh -c ./compile.sh
|
find ./* -name "*.tex" | entr -n sh -c "./compile.sh $1"
|
||||||
|
|||||||
Reference in New Issue
Block a user