Repository navigation
chore(deps): update dependency https://github.com/diamondlightsource/… #1
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
| on: | ||
| workflow_call: | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Avoid git conflicts when tag and branch pushed at same time | ||
| if: github.ref_type == 'tag' | ||
| run: sleep 60 | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| # Need this to get version number from last tag | ||
| fetch-depth: 0 | ||
| - name: Install system packages | ||
| run: sudo apt-get install graphviz | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v8.3.2 | ||
| - name: Build docs | ||
| run: uv run --locked tox -e docs | ||
| - name: Remove environment.pickle | ||
| run: rm build/html/.doctrees/environment.pickle | ||
| - name: Upload built docs artifact | ||
| <<<<<<< before updating | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||
| ======= | ||
| uses: actions/upload-artifact@v7 | ||
| >>>>>>> after updating | ||
| with: | ||
| name: docs | ||
| path: build | ||
| - name: Sanitize ref name for docs version | ||
| run: echo "DOCS_VERSION=${GITHUB_REF_NAME//[^A-Za-z0-9._-]/_}" >> $GITHUB_ENV | ||
| - name: Move to versioned directory | ||
| run: mv build/html .github/pages/$DOCS_VERSION | ||
| - name: Write switcher.json | ||
| run: python .github/pages/make_switcher.py --add $DOCS_VERSION ${{ github.repository }} .github/pages/switcher.json | ||
| - name: Publish Docs to gh-pages | ||
| if: github.ref_type == 'tag' || github.ref_name == 'main' | ||
| # We pin to the SHA, not the tag, for security reasons. | ||
| # https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions | ||
| uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: .github/pages | ||
| keep_files: true | ||