Introduction
I have actually included hyperlinks to my personal resume on multiple websites, all pointing to the resume on my homepage. However, updating that homepage resume has become quite troublesome due to the frequent need for modifications and copying, so I haven’t updated it in a long time. After nearly a year of working with CI/CD workflows, I’ve gained a solid grasp of GitHub Actions, which led me to develop this resume compilation and distribution workflow. I’m documenting the pitfalls I’ve encountered along the way.
Workflow
Actually, the entire workflow is quite simple.
- Compile the
texfile in the repository into apdffile. - Place the compiled
pdffile into thepdfdirectory of my personal homepage and push the changes.
(Sounds simple, but I encountered quite a few pitfalls, spending nearly 6 hours on it.)
The compilation part didn’t take long. Initially, I wanted to use latexmk-actions1, but after checking, it didn’t fully meet my needs, and since it was still under active development, I abandoned it. I eventually switched to xu-cheng/latex-action@v22. I have to say, the author’s Actions configuration is excellent; it basically fulfilled all my requirements, including handling multiple directories and files without issue.
The main pitfall I encountered was related to 鉴权.
Since I had previously handled cross-repository operations, I typically just used an action like hugo-deploy or gh-pages-deploy, configuring the secrets accordingly. Naturally, I assumed I could handle the push operation with a simple action this time as well. I looked at many Actions related to push; the best-written one was ad-m/github-push-action@master3, but I kept getting the error Error: Invalid exit code: 128. I checked several similar issues reported by the author, but they didn’t resolve it. Google yielded no results, so I had to look for other solutions. I examined a few other options, but they also failed to solve my problem.
Going back to basics, we only need authentication plus the push operation. I wondered if I could authenticate during a Pull or a Push. I tried using the https://[username]:${{ secrets.PUBLISH_KEY }}@github.com/[username]/[repo] format during a Push, but it didn’t work. It didn’t work during a Pull either (though later I thought this approach might actually be feasible: just clone the repo, remove the .git information, treat it as a new repository, then add remote url, add that link, perform the Push, and include the --force parameter. It should work, but I don’t know if anyone has tried it hhh).
Actually, the final solution was the simplest method: utilizing actions/checkout instead of cloning. The official checkout action provides the ssh-key parameter (note: this is not token, unless you are using Personal Access Token instead of Deploy Key below).
The final workflow is as follows. You can view the file version here4.
| |
Implementation
This resume directory has two versions: one in Chinese and one in English. All required font resource files have been uploaded, so you can clone it directly and use it locally. The template was mainly modified from this project5, with some optimizations for Chinese characters.
Additionally, if you have a personal homepage and lack a LaTeX environment but want to compile or distribute the resume in the cloud, you can simply fork this repository, modify the cv_en.tex and cv_cn.tex files, and configure the workflows. The following section primarily covers the execution for those with such requirements.
The following content includes the following declarations:
主仓库: The repository where the PDF needs to be uploaded, e.g., yyyanbj/yyyanbj.github.io
本仓库: The repository containing the resume tex file, e.g., yyyanbj/cv
- Create the Resume
Open [https://github.com/yyyanbj/cv],点击右上角 to fork, navigate to the forked repository under your username, and clone it.
- Modify & Compile the Resume
Modify the tex file according to your needs, as well as the tex file within the subfolder cv.
- Distribute
Generate Deploy Key, refer to GitHub Authentication6
You can follow these steps: 1. ssh-keygen -t rsa -b 4096 -C "your_email@example.com" 2. Add id_rsa.pub to Settings -> Deploy Keys in the main repository; the name can be arbitrary, but you must grant write permissions 3. Add id_rsa to Settings -> Secrets in this repository, and fill in the name as PUBLISH_KEY
Allow GitHub Actions to run, modify the content in .github/workflows/latex.yml as needed (such as repository name, branch name, etc.), then push the changes to the GitHub repository and wait for the build to run.
Conclusion
I hope this helps. If this article or repository infringes upon any of your rights, please contact bj.yan.pa@qq.com, and I will handle it as soon as possible.

