use caches to speed up compilation
This commit is contained in:
parent
9225c03547
commit
92dc505b06
1 changed files with 32 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue