Skip to content

Commit

Permalink
switch to pandoc
Browse files Browse the repository at this point in the history
  • Loading branch information
anishshobithps committed Jan 12, 2025
1 parent e6f57d9 commit 94edf0d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 72 deletions.
45 changes: 9 additions & 36 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,12 @@
# Stage 1: Builder with all necessary packages
FROM alpine:latest AS builder
# Base image with LaTeX tools
FROM pandoc/latex:latest

# Install build dependencies in a single layer to optimize caching
RUN apk add --no-cache --update \
texlive \
texlive-pdftex \
texmf-dist-latexextra \
texmf-dist-fontsextra \
fontconfig \
perl \
make \
&& texhash
# Update TeX Live Manager and install required packages
RUN tlmgr update --self && \
tlmgr install enumitem titlesec xcharter etoolbox xstring geometry fancyhdr xkeyval fontaxes

# Stage 2: Final image with only runtime dependencies
FROM alpine:latest
# Default working directory
WORKDIR /data

# Install minimal runtime dependencies for LaTeX compilation
RUN apk add --no-cache --update \
texlive-pdftex \
texmf-dist-latexextra \
texmf-dist-fontsextra \
fontconfig

# Copy only required texmf directories from builder to minimize image size
COPY --from=builder /usr/share/texmf-dist /usr/share/texmf-dist

# Set working directory
WORKDIR /latex

# Copy your LaTeX files and entrypoint script
COPY entrypoint.sh /entrypoint.sh
COPY *.tex *.cls *.sty ./

# Make entrypoint executable and refresh TeX file database
RUN chmod +x /entrypoint.sh && texhash

# Set default entrypoint
ENTRYPOINT ["/entrypoint.sh"]
# Set pdflatex as the default entrypoint
ENTRYPOINT ["pdflatex"]
32 changes: 0 additions & 32 deletions .docker/entrypoint.sh

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ jobs:
- name: Build LaTeX document
run: |
mkdir -p output
docker run --rm -v ${{ github.workspace }}:/latex \
ghcr.io/${{ github.repository_owner }}/latex-builder:latest
docker build -t pdflatex .docker
docker run --rm -v "${{ github.workspace }}:/data" pdflatex -jobname="Anish_Shobith_P_S_Resume" main.tex
- name: Create Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
tag_name: v$(date +'%Y.%m.%d')
name: "Resume Update $(date +'%Y.%m.%d')"
name: "Resume Update $(date +'%d.%m.%Y')"
body: |
📄 Resume update $(date +'%Y.%m.%d')
📄 Resume update $(date +'%d.%m.%Y')
**Commit**: ${{ github.sha }}
**Branch**: main
Expand Down

0 comments on commit 94edf0d

Please sign in to comment.