use caches to speed up compilation
All checks were successful
Build LaTeX packages / build (push) Successful in 1m45s
Build LaTeX packages / pages (push) Successful in 6m20s

This commit is contained in:
Maximilian Keßler 2023-10-19 12:56:19 +02:00
parent 9225c03547
commit 92dc505b06
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -33,22 +33,48 @@ jobs:
.ci/deploy_to_build_repo.sh
env:
REF_NAME: ${{ github.ref_name }}
- name: Compile documentation
- name: Clean up git files from build repo
if: github.ref == 'refs/heads/master'
run: |
echo ${TEXINPUTS}
make doc
run: rm -rf build/packages/.git
- name: Save built packages to cache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@v3
with:
path: build/packages/
key: ${{ github.ref }}-packages
pages:
runs-on: latex-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Load package cache
uses: actions/cache/restore@v3
with:
path: build/packages/
key: ${{ github.ref }}-packages
- name: Load compilation cache
uses: actions/cache/restore@v3
with:
path: .compile
key: ${{ github.ref }}-doc
- name: Compile documentation
run: make doc
env:
TEXINPUTS: '${{ github.workspace }}/build/packages//:'
- name: Prepage pages
if: github.ref == 'refs/heads/master'
run: |
cd build
rm -rf packages/.git # Don't deploy the git files
zip -r latex-packages.zip packages/ -x '*.git*'
zip -r latex-packages-doc.zip doc/
- name: Deploy to pages
if: github.ref == 'refs/heads/master'
uses: actions/pages@v1
with:
directory: build/
- name: Upload compilation cache
uses: actions/cache/save@v3
with:
path: .compile
key: ${{ github.ref }}-doc