latex-packages/.gitea/workflows/build.yaml
Maximilian Keßler bc3a076cd6
All checks were successful
Build LaTeX packages / build (push) Successful in 57s
Build LaTeX packages / pages (push) Successful in 1m7s
ci-test
2023-10-19 13:09:28 +02:00

81 lines
2.4 KiB
YAML

name: Build LaTeX packages
on: [push]
jobs:
build:
runs-on: latex-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # We need all history to correctly parse tag names
fetch-tags: true
- name: Setup git credentials and committer
run: .ci/configure_git.sh
env:
DEPLOY_SSH_KEY: ${{ secrets.deploy_ssh_key }}
- name: Clone build repository
uses: actions/checkout@v4
with:
repository: latex/latex-packages-build
path: build/packages
ref: master
- name: Checkout correct branch in build repository
run: |
.ci/setup_build_repo_branch.sh
env:
REF_NAME: ${{ github.ref_name }}
- name: Build packages incrementally
run: make
- name: Push packages to build repo
run: |
.ci/deploy_to_build_repo.sh
env:
REF_NAME: ${{ github.ref_name }}
- name: Clean up git files from build repo
if: github.ref == 'refs/heads/master'
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
requires: build
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
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
uses: actions/pages@v1
with:
directory: build/
- name: Upload compilation cache
uses: actions/cache/save@v3
with:
path: .compile
key: ${{ github.ref }}-doc