release: 2025-12-02 #53
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: Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - "docs/**" | |
| - ".github/workflows/Documentation.yml" | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - ".github/workflows/Documentation.yml" | |
| jobs: | |
| build: | |
| # These permissions are needed to: | |
| # - Deploy the documentation: https://documenter.juliadocs.org/stable/man/hosting/#Permissions | |
| # - Delete old caches: https://github.com/julia-actions/cache#usage | |
| permissions: | |
| actions: write | |
| contents: write | |
| pull-requests: read | |
| statuses: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: '1' | |
| - uses: julia-actions/cache@v2 | |
| - name: Install dependencies | |
| shell: julia --color=yes --project=docs {0} | |
| run: | | |
| using Pkg | |
| Pkg.develop(PackageSpec(path=pwd())) | |
| Pkg.instantiate() | |
| - name: Get release date | |
| id: release_date | |
| run: | | |
| # Fetch release branch to get the latest release date | |
| git fetch origin release --depth=100 | |
| DATE=$(git log origin/release --oneline --grep="^release:" -1 --format="%s" | grep -oE '[0-9]{4}-[0-9]{2}-[0-9]{2}' || echo "") | |
| echo "date=$DATE" >> $GITHUB_OUTPUT | |
| - name: Build and deploy | |
| run: julia --color=yes --project=docs docs/make.jl | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} | |
| DOCUMENTER_RELEASE_DATE: ${{ steps.release_date.outputs.date }} | |
| - name: Set release as default version | |
| if: github.event_name == 'push' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git stash --include-untracked | |
| git fetch origin gh-pages | |
| git checkout gh-pages | |
| echo '<meta http-equiv="refresh" content="0; url=./release/"/>' > index.html | |
| git add index.html | |
| git diff --staged --quiet || git commit -m "Set release as default documentation version" | |
| git push origin gh-pages |