test resume #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate PDF and Create Release | |
on: | |
push: | |
paths: | |
- "resume/**" # Trigger when files in the resume directory are updated | |
workflow_dispatch: | |
jobs: | |
build-pdf: | |
name: Build PDF and Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Generate PDF | |
run: | | |
mkdir -p resume/output | |
docker run --rm -v ${{ github.workspace }}/resume:/workspace -w /workspace docker.io/danpilch/cv-build:v1 xelatex -output-directory=output danpilch_resume.xtx | |
- name: Rename PDF with Date | |
run: | | |
DATE=$(date +"%Y-%m-%d") | |
mv resume/output/danpilch_resume.pdf resume/output/danpilch_resume_$DATE.pdf | |
- name: Create Git Tag | |
id: create_tag | |
run: | | |
DATE=$(date +"%Y-%m-%d") | |
TAG="resume-$DATE" | |
git tag $TAG | |
git push origin $TAG | |
echo "tag_name=$TAG" >> $GITHUB_ENV | |
- name: Upload PDF to Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: resume/output/danpilch_resume_*.pdf | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ env.tag_name }} | |
- name: Notify Success | |
run: echo "PDF generated and added to release." | |
- name: Upload PDF to Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: resume/output/danpilch_resume_*.pdf | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Notify Success | |
run: echo "PDF generated and added to release." |