typo (/) #196
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: | |
| # tags: | |
| # - 'v*' # Trigger the workflow when a new tag starting with 'v' is pushed | |
| jobs: | |
| build-ximera: | |
| name: Build and preview Ximera Courses | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| packages: write | |
| env: | |
| # These variables can/should be set at repository level | |
| # If not set, defaults from xmScripts/config.txt or xmlatex will be used | |
| # (The defaults will presumably make publishing fail.) | |
| GPG_KEY: ${{ secrets.GPG_KEY }} | |
| GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | |
| # The XIMERA_xxx variables can be overwritten infra !!! | |
| XIMERA_URL: "xerxes.ximera.org/" | |
| XIMERA_NAME: "ximeraexamples" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # full | |
| - name: Setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/*.html | |
| **/*.svg | |
| **/*.aux | |
| **/*.xref | |
| **/*.toc | |
| !xmPictures/** | |
| !.git/** | |
| !.github/** | |
| key: ximera-${{ github.ref_name }}-${{ github.sha }} | |
| restore-keys: | | |
| ximera-${{ github.ref_name }}- | |
| ximera- | |
| - name: Build and publish Ximera courses | |
| env: | |
| XIMERA_NAME: ximeraexamples*${{ github.ref_name }} | |
| XOURSES: "." # "./testXourses" | |
| # XOURSES: "dtxTests/image dtxTests/sage*" # "./testXourses" | |
| # XOURSES: "dtxTests" # "./testXourses" | |
| XAKE_VERSION: "latest" | |
| XM_COMPILE_SEQUENCE: "pdf,handout.pdf,html" | |
| run: | | |
| ls -alrt | |
| chmod +x xmScripts/xmlatex # Overleaf sync might reset it :-() | |
| # ./xmScripts/xmlatex veryclean dtxTests/image # TO BE REMOVED | |
| ./xmScripts/xmlatex ghaction -j 8 $XOURSES | |
| echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY | |
| - name: Setup ximera serve cache (only .git) | |
| id: serve-cache | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: | | |
| xmScripts/** | |
| .git/** | |
| key: ximeraSERVE-${{ github.ref_name }}-${{ github.sha }} | |
| publish-ximera: | |
| name: Publish Ximera Courses | |
| needs: build-ximera # Waits for the build job to complete | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| environment: production # Allows for 'manual review' step | |
| steps: | |
| - name: Restore ximera serve cache (only .git) | |
| id: serve-cache-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| fail-on-cache-miss: true | |
| path: | | |
| xmScripts/** | |
| .git/** | |
| key: ximeraSERVE-${{ github.ref_name }}-${{ github.sha }} | |
| - name: Serve to XIMERA_URL | |
| run: | | |
| ./xmScripts/xmlatex name | |
| ./xmScripts/xmlatex serve -f | |
| echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY | |
| - name: Serve to ximera.osu.edu | |
| env: | |
| XIMERA_URL: "https://ximera.osu.edu/" | |
| run: | | |
| ./xmScripts/xmlatex name | |
| ./xmScripts/xmlatex serve -f | |
| echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY | |
| - name: Serve to test.xronos.clas.ufl.edu | |
| env: | |
| XIMERA_URL: "https://test.xronos.clas.ufl.edu/" | |
| run: | | |
| ./xmScripts/xmlatex name | |
| ./xmScripts/xmlatex serve -f | |
| echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY | |