remiceres triggered docs render #12
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: "Sphinx: Render production docs" | |
| run-name: ${{ github.actor }} triggered docs render | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| Continuous-Integration-Actions: | |
| runs-on: self-hosted | |
| env: | |
| PACKAGE_TOKEN: ${{ secrets.JLS_TOKEN }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Check existing tags before fetch | |
| run: git tag --sort=-v:refname || echo "No tags found" | |
| - name: Delete all local tags to avoid conflicts | |
| run: git tag -d $(git tag) || echo "No tags to delete" | |
| - name: Fetch updated tags | |
| run: git fetch --prune --tags --force | |
| - name: Check tags after fetch | |
| run: git tag --sort=-v:refname || echo "No tags found after fetch" | |
| - name: Build Sphinx documentation with multiversion | |
| run: | | |
| set -x # Enable debug mode | |
| source /builds/miniconda3/etc/profile.d/conda.sh | |
| conda activate corese-core-documentation | |
| sphinx-multiversion docs/source build/html -D exhale_args.containmentFolder="\${sourcedir}/java_api" | |
| chmod +x docs/switcher_generator.sh | |
| ./docs/switcher_generator.sh build/html/switcher.json build/html/index.html | |
| set +x # Disable debug mode | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build/html | |
| keep_files: true |