core-book/.github/workflows/publish.yaml
Joe bellus 5e45390a87
All checks were successful
Test PDF / compile (push) Successful in 15s
Added test CI action
2025-03-10 21:54:34 -04:00

44 lines
1.2 KiB
YAML

name: Publish PDF
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Setup tectonic
run: |
apt -y install curl
curl --proto '=https' --tlsv1.2 -fsSL https://drop-sh.fullyjustified.net |sh
- name: Restore cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: ~/.cache/Tectonic
key: ${{ runner.os }}-tectonic-
- name: Compile latex
run: ./tectonic book.tex
- name: Upload
uses: VAllens/gitea-publish-generic-packages@v1
env:
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
with:
token: ${{ secrets.token }}
package_version: ${{ github.sha }}
files: |-
book.pdf
- uses: actions/cache@v3
name: Tectonic cache
with:
path: ~/.cache/Tectonic
key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }}