An CI/CD Tex PDF Publishing Pipeline
The main purpose of this project is used to publish the Latex PDF file automatically. Such as CV or Papers.
For example: My CV Page.
Based on this system, you can publish the PDF file from the Tex source code easily.
The related tools are as follows:
- Overleaf: Professional online Tex editor (accquire ShareLatex)
- CircleCI: Oniine CI/CD build server which provides free private repo build
- koppor/texlive:v1.5.0 Docker Image: One of best Tex build docklized environment
- PDF.js: Javascript library to render PDF professionally
- GitHub Page: Free to server static HTML files
- html5up: Free CC spiffy HTML5 site templates
- REPO1: Tex Source Code Repo (It could be private). It can be forked from this repo.
- REPO2: Published Web Repo (It should be public). It can be forked form the corresponding demo repo.
There are several things you must update in the file of .circleci/gh_publish.sh
[email protected] # update to your email address which will be used as commit author
G_GIT_NAME="Xin Meng" # update to your name which will be used as commit author
[email protected]:xmeng1/texpdf.git # update to your repo for publish web page with PDF files
PUBLISH_GIT_BRANCH=master # the branch used in the publish repo
If you fork REPO2 from the demo repo, just keep these parameters.
The value of these variables are based on the default REPO1 and REPO2, if you want to update them, you MUST update corresponding environment context config.
If you change this name, you must update the published HTML and PDF.js corresponding link. You can search professional_pdf_latest
in the demo repo and check all usages.
var url = '/texpdf/pdf/publish/professional_pdf_latest.pdf';
If you change this name, you need to change main.tex
with same name or update [.circleci/config.yml](.circleci/config.yml)
corresponding build command xelatex main.tex
to specific outhput pdf file name.
This is relative path of PDF files stored on the REPO2. If you change this name, you must update the published HTML and PDF.js corresponding link.
You can login CircleCi by using the GitHub account and setup the projects as follows:
Click the config of specific project:
Authorised
You just need to update the version file latest-version.txt and the circleci build will be triggered automatically.
You can check the build log:
You can use the Overleaf to edit the Latex source code by using the import feature. (This feature is not free, but you can get it by reference friends see this link: Overleaf Bonus)