bump version to 0.7.0 #113
This file contains 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: Create documentation and push to gh-pages | |
on: | |
push: | |
branches: [main] | |
tags: ["v*.*.*"] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
make_docs: | |
name: Create documentation for ${{ github.ref_name }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out ${{ github.ref_name }} | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: "pyproject.toml" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "0.5.6" | |
- name: Install packages | |
run: uv sync --all-extras --dev | |
- name: Generate documentation | |
run: uv run pdoc --math fast_forward fast_forward.util.pyterrier -d restructuredtext -o docs/${{ github.ref_name }} | |
- name: Store generated documentation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs/${{ github.ref_name }} | |
publish_docs: | |
name: Push documentation for ${{ github.ref_name }} to gh-pages | |
needs: | |
- make_docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out gh-pages | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Remove old files | |
run: | | |
rm -rf docs/${{ github.ref_name }} | |
rm -f docs/index.html | |
- name: Download generated documentation | |
uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
path: docs/${{ github.ref_name }} | |
- name: Generate directory listing | |
uses: jayanta525/[email protected] | |
with: | |
FOLDER: . | |
- name: Push to gh-pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs | |
destination_dir: docs |