Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 54 additions & 56 deletions .github/workflows/serve-ximera-split.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: Ximera Workflow
name: "Ximera Workflow (split pdf/html)"

on:
push:
branches:
- 'main'
# branches:
# - 'main'

env:
TEXMFHOME: /root/texmf # Should be set in xmlatex !
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 calculus1.tex"
XM_TO_PROCESS: "testxourse.tex calculus*.tex"

jobs:

Expand All @@ -20,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
container: &x-container
image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2
image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2-full
options: >-
--workdir /code
permissions:
Expand All @@ -29,12 +30,14 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v4
- name: "Prepare: Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 0

# Restore cache for cross-run speedup
- uses: actions/cache/restore@v4
- name: "Prepare: Restore cache"
uses: actions/cache/restore@v4
with:
path: |
**/*.pdf
Expand All @@ -54,31 +57,14 @@ jobs:
ximeraPDFexport-
ximeraHTMLexport-

- run: |
# git config --global --add safe.directory /code
git config --global --add safe.directory /__w/calculus/calculus
export TEXMFHOME=/root/texmf
export LUA_PATH="/root/texmf/tex/latex/ximeraLatex/luaxake/?.lua;;"
- name: "XIMERA: pdfexport (prepare for tikzpictures)"
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
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
- uses: actions/upload-artifact@v4
- name: "Postprocess: Save artifacts"
uses: actions/upload-artifact@v4
with:
name: pdfexport
path: .
Expand All @@ -95,24 +81,26 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v4
- name: "Prepare: Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 0

# Download artifact from previous job
- uses: actions/download-artifact@v4
- name: "Prepare: Checkout artifacts from previous step"
uses: actions/download-artifact@v4
with:
name: pdfexport
path: .

- run: |
git config --global --add safe.directory /code
git config --global --add safe.directory /__w/calculus/calculus
export TEXMFHOME=/root/texmf
- name: "XIMERA: htmlexport (generate html)"
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
xmlatex bake --compile htmlexport -j 5 $XM_TO_PROCESS

# Save cache
- uses: actions/cache/save@v4
- name: "Postprocess: Save cache"
uses: actions/cache/save@v4
with:
path: |
**/*.pdf
Expand All @@ -128,13 +116,14 @@ jobs:
key: ximeraHTMLexport-${{ github.ref_name }}-${{ github.run_id }}

# Upload artifact
- uses: actions/upload-artifact@v4
- name: "Postprocess: Save artifacts"
uses: actions/upload-artifact@v4
with:
name: htmlexport
path: .

build-ximera-serve:
name: Run frost/serve preview
serve-ximera-preview:
name: "Run serve for (automatic) preview version"
needs: build-ximera-htmlexport
# continue-on-error: true
runs-on: ubuntu-latest
Expand All @@ -145,26 +134,26 @@ jobs:
packages: write

steps:
- name: Checkout code
- name: "Prepare: Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 0

# Download artifact from previous job
- name: Restore artifacts from previous job
- name: "Prepare: Checkout artifacts (from previous step)"
uses: actions/download-artifact@v4
with:
name: htmlexport
path: .

- name: "Serve to ${{env.XIMERA_NAME}} on ${{env.XIMERA_URL}}"
- name: "XIMERA: Serve PREVIEW version to ximeraserver"
run: |
git config --global --add safe.directory /code
git config --global --add safe.directory /__w/calculus/calculus
export TEXMFHOME=/root/texmf
echo "Serving to $XIMERA_URL$XIMERA_NAME"
git config --global --add safe.directory "$GITHUB_WORKSPACE"
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"
Expand All @@ -174,31 +163,40 @@ jobs:
# path: .

publish-ximera:
name: Run serve to mooculus
needs: build-ximera-serve
name: Run serve for public version
needs: serve-ximera-preview
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
- uses: actions/download-artifact@v4
- name: Restore artifacts from previous job
uses: actions/download-artifact@v4
with:
name: htmlexport
path: .

- run: |
- 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 /code
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 "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
env:
XIMERA_URL: "https://xerxes.ximera.org/"
# XIMERA_URL: "https://ximera.osu.edu/"
XIMERA_NAME: "mooculus"

2 changes: 1 addition & 1 deletion testxourse.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ \part{Functions}
\activity{reviewOfFamousFunctions/breakGround.tex}
\activity{reviewOfFamousFunctions/digInPolynomialFunctions.tex}
\activity{reviewOfFamousFunctions/digInRationalFunctions.tex}
% \activity{reviewOfFamousFunctions/digInTrigonometricFunctions.tex}
\activity{reviewOfFamousFunctions/digInTrigonometricFunctions.tex}
% \activity{reviewOfFamousFunctions/digInExponentialAndLogarithmeticFunctions.tex}


Expand Down
Loading