Skip to content

fix paths

fix paths #34

Workflow file for this run

name: Generate Resume & Create Release
on:
push:
paths:
- "resume/**" # Trigger when files in the resume directory are updated
workflow_dispatch:
jobs:
build-and-release:
name: Build Resume and Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Generate various formats
run: |
set -e
DATE=$(date +"%Y-%m-%d")
mkdir -p resume/output
# Build PDF using XeLaTeX
docker run --rm \
-v ${PWD}:/workspace -w /workspace \
docker.io/danpilch/cv-build:v5 \
xelatex -jobname=danpilch-resume-${DATE} -output-directory=resume/output resume/resume.tex
# Build HTML
docker run --rm \
-v ${PWD}:/workspace -w /workspace \
docker.io/danpilch/cv-build:v5 \
make4ht --utf8 -a debug -B .build -f html5+inlinecss --output-dir ./resume/output/ -l ./resume/resume.tex "xelatex"
# Set name of HTML and CSS resume
mv ./resume/output/resume.html ./resume/output/danpilch-resume-${DATE}.html
mv ./resume/output/resume.css ./resume/output/danpilch-resume-${DATE}.css
# Build Markdown (requires Pandoc in the container)
sed -E \
-e 's/\\runsubsection\{([^}]*)\}/\\section{\1}/g' \
-e 's/\\descript\{\|\s*([^}]*)\}/\\textbf{\1}/g' \
-e 's/\\location\{([^}]*)\}/\\emph{\1}/g' \
-e 's/tightemize/itemize/g' \
-e 's/\\sectionsep//g' \
./resume/resume.tex > resume_tmp.tex
docker run --rm \
-v ${PWD}:/workspace -w /workspace \
docker.io/danpilch/cv-build:v5 \
pandoc -s resume_tmp.tex -o ./resume/output/danpilch-resume-${DATE}.md
- name: Create Unique Git Tag
id: create_tag
run: |
TIMESTAMP=$(date +"%Y-%m-%d-%H%M%S")
TAG="resume-${TIMESTAMP}"
git tag "$TAG"
git push origin "$TAG"
echo "tag_name=$TAG" >> $GITHUB_ENV
- name: Upload All Resumes to Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.tag_name }}
files: |
resume/output/danpilch-resume-*.pdf
resume/output/danpilch-resume-*.html
resume/output/danpilch-resume-*.css
resume/output/danpilch-resume-*.md
- name: Notify Success
run: echo "Resume files generated and attached to release."