Caching in actions #26
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: Create and publish the CV | |
on: | |
push: | |
# paths: | |
# - CV | |
# tags: | |
# - 'v*.*.*' | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/actions/cache#creating-a-cache-key | |
# http://man7.org/linux/man-pages/man1/date.1.html | |
- name: Get Date | |
id: get-date | |
run: | | |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")" | |
shell: bash | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
# A list of files, directories, and wildcard patterns to cache and restore | |
path: | | |
*.aux | |
*.lof | |
*.lot | |
*.fls | |
*.out | |
*.toc | |
*.fmt | |
*.fot | |
*.cb | |
*.cb2 | |
.*.lb | |
*.bbl | |
*.bcf | |
*.blg | |
*-blx.aux | |
*-blx.bib | |
*.run.xml | |
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }} | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Compile LaTeX document for german CV | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: cv_german.tex | |
working_directory: "CV" | |
env: | |
TEXINPUTS: ".:./CV//:" | |
- name: Compile LaTeX document for english CV | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: cv_english.tex | |
working_directory: "CV" | |
env: | |
TEXINPUTS: ".:./CV//:" | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
with: | |
tag_name: ${{ github.sha }} | |
files: | | |
CV/cv_german.pdf | |
CV/cv_english.pdf |