diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index d7059ab..05c0925 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -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: @@ -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: @@ -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 @@ -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: . @@ -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 @@ -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 @@ -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" @@ -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" + diff --git a/testxourse.tex b/testxourse.tex index 780aa64..923e6ee 100644 --- a/testxourse.tex +++ b/testxourse.tex @@ -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}