Repository navigation
Update vendored lm15 to 1.2.3 with temporary auth fixes #2544
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: Update DSPy Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "docs/**" | |
| - "dspy/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - "dspy/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| permissions: {} | |
| jobs: | |
| build-test: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies and build | |
| run: | | |
| pip install -r docs/requirements.txt -e . | |
| python docs/scripts/build_docs.py current \ | |
| --config docs/mkdocs.yml \ | |
| --output docs/site | |
| publish-current: | |
| if: github.event_name == 'push' && github.repository == 'stanfordnlp/dspy' | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: dspy-docs-deployment | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| cache-dependency-path: docs/requirements.txt | |
| - name: Install documentation dependencies | |
| run: python -m pip install -r docs/requirements.txt -e . | |
| - name: Build Current documentation | |
| run: | | |
| python docs/scripts/build_docs.py current \ | |
| --config docs/mkdocs.yml \ | |
| --output current-site | |
| - name: Check out documentation deployment | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| repository: krypticmouse/dspy-docs | |
| ref: master | |
| path: docs-deployment | |
| persist-credentials: false | |
| token: ${{ secrets.GH_PAT }} # zizmor: ignore[secrets-outside-env] | |
| - name: Publish Current through Mike | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_PAT }} | |
| run: | | |
| gh auth setup-git | |
| git -C docs-deployment config user.name github-actions | |
| git -C docs-deployment config user.email github-actions@github.com | |
| for attempt in 1 2 3; do | |
| git -C docs-deployment fetch origin master | |
| git -C docs-deployment reset --hard origin/master | |
| python docs/scripts/publish_versioned_docs.py \ | |
| --repository docs-deployment \ | |
| --site current-site \ | |
| --identifier current \ | |
| --package-source working-tree \ | |
| --branch master \ | |
| --require-current-renderer zensical | |
| if git -C docs-deployment push origin master; then | |
| exit 0 | |
| fi | |
| sleep $((2 ** attempt + RANDOM % 5)) | |
| done | |
| echo "::error::Documentation deployment changed repeatedly; rerun this workflow" | |
| exit 1 |