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 .ci/deploy_to_build_repo.sh
env: env:
REF_NAME: ${{ github.ref_name }} REF_NAME: ${{ github.ref_name }}
- name: Compile documentation - name: Clean up git files from build repo
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
run: | run: rm -rf build/packages/.git
echo ${TEXINPUTS} - name: Save built packages to cache
make doc 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: env:
TEXINPUTS: '${{ github.workspace }}/build/packages//:' TEXINPUTS: '${{ github.workspace }}/build/packages//:'
- name: Prepage pages - name: Prepage pages
if: github.ref == 'refs/heads/master'
run: | run: |
cd build cd build
rm -rf packages/.git # Don't deploy the git files rm -rf packages/.git # Don't deploy the git files
zip -r latex-packages.zip packages/ -x '*.git*' zip -r latex-packages.zip packages/ -x '*.git*'
zip -r latex-packages-doc.zip doc/ zip -r latex-packages-doc.zip doc/
- name: Deploy to pages - name: Deploy to pages
if: github.ref == 'refs/heads/master'
uses: actions/pages@v1 uses: actions/pages@v1
with: with:
directory: build/ directory: build/
- name: Upload compilation cache
uses: actions/cache/save@v3
with:
path: .compile
key: ${{ github.ref }}-doc