Skip to content

Fix action

Fix action #38

name: Ximera Workflow

Check failure on line 1 in .github/workflows/serve-ximera-split.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/serve-ximera-split.yml

Invalid workflow file

(Line: 185, Col: 12): Job 'publish-ximera' depends on unknown job 'build-ximera-serve'.
on:
push:
# branches:
# - 'main'
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
XIMERA_NAME: wimcalc20250904
# XIMERA_URL: "https://ximera.osu.edu/"
XIMERA_URL: "https://xerxes.ximera.org/"
XM_TO_PROCESS: "testxourse.tex"
jobs:
build-ximera-pdfexport:
name: Run pdfexport
runs-on: ubuntu-latest
continue-on-error: true
container: &x-container
image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2
options: >-
--workdir /code
permissions:
actions: read
contents: read
packages: write
steps:
- name: "Prepare: Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 0
# Restore cache for cross-run speedup
- name: "Prepare: Restore cache"
uses: actions/cache/restore@v4
with:
path: |
**/*.pdf
**/*.html
**/*.aux
**/*.log
**/*.toc
**/*.xref
**/*.svg
**/*.png
!.git/**
!.github/**
key: ximeraPDFexport-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
ximeraHTMLexport-${{ github.ref_name }}-
ximeraPDFexport-${{ github.ref_name }}-
ximeraPDFexport-
ximeraHTMLexport-
- name: "XIMERA: pdfexport (prepare for tikzpictures)"
run: |
git config --global --add safe.directory /__w/calculus/calculus
export TEXMFHOME=/root/texmf
xmlatex bake --compile pdfexport -j 5 $XM_TO_PROCESS
# # Save cache for future runs
# - uses: actions/cache/save@v4
# with:
# path: |
# **/*.pdf
# **/*.html
# **/*.aux
# **/*.log
# **/*.toc
# **/*.xref
# **/*.svg
# **/*.png
# !.git/**
# !.github/**
# key: ximeraPDFexport-${{ github.ref_name }}-latest
# Upload artifact for next job
- name: "Postprocess: Save artifacts"
uses: actions/upload-artifact@v4
with:
name: pdfexport
path: .
build-ximera-htmlexport:
name: Run htmlexport
needs: build-ximera-pdfexport
runs-on: ubuntu-latest
continue-on-error: true
container: *x-container
permissions:
actions: read
contents: read
packages: write
steps:
- name: "Prepare: Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 0
# Download artifact from previous job
- name: "Prepare: Checkout artifacts from previous step"
uses: actions/download-artifact@v4
with:
name: pdfexport
path: .
- name: "XIMERA: htmlexport (generate html)"
run: |
git config --global --add safe.directory /__w/calculus/calculus
export TEXMFHOME=/root/texmf
xmlatex bake --compile htmlexport -j 5 $XM_TO_PROCESS
# Save cache
- name: "Postprocess: Save cache"
uses: actions/cache/save@v4
with:
path: |
**/*.pdf
**/*.html
**/*.aux
**/*.log
**/*.toc
**/*.xref
**/*.svg
**/*.png
!.git/**
!.github/**
key: ximeraHTMLexport-${{ github.ref_name }}-${{ github.run_id }}
# Upload artifact
- name: "Postprocess: Save artifacts"
uses: actions/upload-artifact@v4
with:
name: htmlexport
path: .
serve-ximera-preview:
name: "Run serve for (automatic) preview version"
needs: build-ximera-htmlexport
# continue-on-error: true
runs-on: ubuntu-latest
container: *x-container
permissions:
actions: read
contents: read
packages: write
steps:
- name: "Prepare: Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 0
# Download artifact from previous job
- name: "Prepare: Checkout artifacts (from previous step)"
uses: actions/download-artifact@v4
with:
name: htmlexport
path: .
- name: "XIMERA: Serve PREVIEW version to ximeraserver"
run: |
echo "Serving to $XIMERA_URL$XIMERA_NAME"
git config --global --add safe.directory /__w/calculus/calculus
export TEXMFHOME=/root/texmf
xmlatex name
xmlatex frost $XM_TO_PROCESS
xmlatex serve $XM_TO_PROCESS
echo "✅ Published to $XIMERA_URL$XIMERA_NAME "
echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY
# - name: "Store artifacts"
# uses: actions/upload-artifact@v4
# with:
# name: serve
# path: .
publish-ximera:
name: Run serve for public version
needs: build-ximera-serve
runs-on: ubuntu-latest
continue-on-error: true
container: *x-container
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Download final artifact
- name: Restore artifacts from previous job
uses: actions/download-artifact@v4
with:
name: htmlexport
path: .
- name: "XIMERA BUILD: Serve to ximeraserver (to public URL)"
env:
XIMERA_URL: "https://xerxes.ximera.org/"
# XIMERA_URL: "https://ximera.osu.edu/"
XIMERA_NAME: "mooculus"
run: |
echo "Serving to $XIMERA_URL$XIMERA_NAME"
git config --global --add safe.directory /__w/calculus/calculus
export TEXMFHOME=/root/texmf
xmlatex name
xmlatex serve -t $XM_TO_PROCESS
# echo "Recent git log:"
# git log --oneline --graph --decorate --all -n 10
echo "✅ Published to $XIMERA_URL$XIMERA_NAME "
echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY