Resume Automation With Github Automation
Overview
After moving my Resume to pandoc and wkhtmltopdf I still needed to manually build the files. By leveraging Github Actions building and uploading can be easily automated.
Github Action Setup
Setting up the github action was quite simple. Below is the code commented in full. It breaks down into a few simple parts. First create the rules surrounding when to run the github action and permissions. Step two clone the git repo and install the dependacies needed for building the resume. Finally build the Resume, rename the files and upload them to the release.
name: Build Resume Releases
run-name: "Building and uploading release pdf and html documents."
# Setup permissions
permissions:
contents: write
# Run on Tag Versions
on:
push:
tags:
- "v*"
jobs:
build:
# Build using ubuntu latest
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
# Install packages needed for resume
- name: Install Panodoc
run: sudo apt-get install pandoc
- name: Install wkhtmltopdf
run: sudo apt-get install wkhtmltopdf
# Run resume build
- name: Build Resume
run: make all
# Rename generated files
- name: Rename pdf built resume
run: mv ./build/bnarin_resume.pdf ./build/bnarin_resume_$.pdf
- name: Rename html built resume
run: mv ./build/bnarin_resume.html ./build/bnarin_resume_$.html
# Upload generated files to the release
- name: Create Release and Upload Files
uses: softprops/action-gh-release@v0.1.15
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/bnarin_resume_$.html
build/bnarin_resume_$.pdf
Conclusion
The problem I set out to solve was definitely self inflicted when I switched to a compiled resume. However between the new Github Action and simple release tagging keeping copies of my resume will be infinitely easier. Of all the things this does I am most excited to have tagged finalized resumes which are full proof in what version gets submitted to the release. While this was my first time messing around with github action, it will be far from my last, I am curious what other things can be done and automated with the github actions pipeline.