fix missing .xbb 2 #94
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ximera Workflow | |
| on: | |
| push: | |
| branches: | |
| - 'fix-hints' | |
| env: | |
| TEXMFHOME: /root/texmf # Should be set in xmlatex ! | |
| GPG_KEY: ${{ secrets.GPG_KEY }} | |
| GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | |
| # XIMERA_NAME: wimcalc20250905 | |
| XIMERA_NAME: wimcalchints | |
| XIMERA_URL: "https://ximera.osu.edu/" | |
| # XIMERA_URL: "https://xerxes.ximera.org/" | |
| XM_TO_PROCESS: "testxourse.tex" | |
| # XM_TO_PROCESS: "testxourse.tex calculus*.tex calculus*TextbookBySection [a-z]*/exercises/exerciseList.tex" | |
| # XM_TO_PROCESS: "." | |
| jobs: | |
| build-ximera-htmlexport: | |
| name: Run pdfexport and htmlexport | |
| 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: | | |
| **/*.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 }}- | |
| - name: "XIMERA: pdf and html (tikzexternalize/html)" | |
| run: | | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| mkdir -p .git/refs/heads | |
| [ -f ".git/refs/heads/master.tex" ] || date >".git/refs/heads/master.tex" | |
| echo "Add .xbb" | |
| ./xmScripts/add_xbb.sh linesAndCurvesInSpace | |
| # xmlatex bake --compile pdfexport -j 5 $XM_TO_PROCESS | |
| xmlatex bake --compile htmlexport -j 5 $XM_TO_PROCESS | |
| # Save cache | |
| - name: "Postprocess: Save cache" | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: | | |
| **/*.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 "$GITHUB_WORKSPACE" | |
| du -hs ximera-downloads | |
| rm -rf ximera-downloads/* | |
| du -hs . | |
| 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: serve-ximera-preview | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| 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 | |