diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index c35a212..590cf85 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -41,6 +41,7 @@ jobs: - mkdocs.no-insiders.yml - .github/workflows/build-docs.yml - .github/workflows/deploy-docs.yml + - data/** build-docs: needs: @@ -58,7 +59,7 @@ jobs: with: python-version: "3.11" - name: Setup uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 with: version: "0.4.15" enable-cache: true diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 6849bd7..d8634e2 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -29,7 +29,7 @@ jobs: with: python-version: "3.11" - name: Setup uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 with: version: "0.4.15" enable-cache: true diff --git a/.github/workflows/latest-changes.yml b/.github/workflows/latest-changes.yml index 77a3b3e..d02ae1d 100644 --- a/.github/workflows/latest-changes.yml +++ b/.github/workflows/latest-changes.yml @@ -30,7 +30,7 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }} with: limit-access-to-actor: true - - uses: tiangolo/latest-changes@0.3.1 + - uses: tiangolo/latest-changes@0.3.2 with: token: ${{ secrets.GITHUB_TOKEN }} latest_changes_file: docs/release-notes.md diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 10be182..725928a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,4 +34,4 @@ jobs: TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }} run: python -m build - name: Publish - uses: pypa/gh-action-pypi-publish@v1.9.0 + uses: pypa/gh-action-pypi-publish@v1.12.3 diff --git a/.github/workflows/smokeshow.yml b/.github/workflows/smokeshow.yml index 651f838..7a1c88d 100644 --- a/.github/workflows/smokeshow.yml +++ b/.github/workflows/smokeshow.yml @@ -21,7 +21,7 @@ jobs: with: python-version: '3.9' - name: Setup uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 with: version: "0.4.15" enable-cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3509d5d..4590e08 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Setup uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 with: version: "0.4.15" enable-cache: true @@ -92,7 +92,7 @@ jobs: with: python-version: '3.12' - name: Setup uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v4 with: version: "0.4.15" enable-cache: true diff --git a/data/members.yml b/data/members.yml index 4dba986..7a51cbc 100644 --- a/data/members.yml +++ b/data/members.yml @@ -1,4 +1,3 @@ members: - login: tiangolo -- login: estebanx64 - login: alejsdev diff --git a/docs/release-notes.md b/docs/release-notes.md index 672f68c..083ce99 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -17,6 +17,12 @@ ### Internal +* ⬆ Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.12.3. PR [#1240](https://github.com/fastapi/sqlmodel/pull/1240) by [@dependabot[bot]](https://github.com/apps/dependabot). +* ⬆ Bump astral-sh/setup-uv from 3 to 4. PR [#1225](https://github.com/fastapi/sqlmodel/pull/1225) by [@dependabot[bot]](https://github.com/apps/dependabot). +* ⬆ Bump tiangolo/latest-changes from 0.3.1 to 0.3.2. PR [#1207](https://github.com/fastapi/sqlmodel/pull/1207) by [@dependabot[bot]](https://github.com/apps/dependabot). +* 🔨 Update docs previews script. PR [#1236](https://github.com/fastapi/sqlmodel/pull/1236) by [@tiangolo](https://github.com/tiangolo). +* 🔧 Update build-docs filter paths. PR [#1235](https://github.com/fastapi/sqlmodel/pull/1235) by [@tiangolo](https://github.com/tiangolo). +* 🔧 Update team members. PR [#1234](https://github.com/fastapi/sqlmodel/pull/1234) by [@tiangolo](https://github.com/tiangolo). * ⬆️ Upgrade markdown-include-variants to version 0.0.3. PR [#1152](https://github.com/fastapi/sqlmodel/pull/1152) by [@tiangolo](https://github.com/tiangolo). * 👷 Update issue manager workflow. PR [#1137](https://github.com/fastapi/sqlmodel/pull/1137) by [@alejsdev](https://github.com/alejsdev). * 👷 Fix smokeshow, checkout files on CI. PR [#1136](https://github.com/fastapi/sqlmodel/pull/1136) by [@tiangolo](https://github.com/tiangolo). diff --git a/scripts/deploy_docs_status.py b/scripts/deploy_docs_status.py index 8cef2f7..c107db9 100644 --- a/scripts/deploy_docs_status.py +++ b/scripts/deploy_docs_status.py @@ -2,9 +2,11 @@ import logging import re from github import Github -from pydantic import SecretStr +from pydantic import BaseModel, SecretStr from pydantic_settings import BaseSettings +site_domain = "sqlmodel.tiangolo.com" + class Settings(BaseSettings): github_repository: str @@ -15,7 +17,12 @@ class Settings(BaseSettings): is_done: bool = False -def main(): +class LinkData(BaseModel): + previous_link: str + preview_link: str + + +def main() -> None: logging.basicConfig(level=logging.INFO) settings = Settings() @@ -60,24 +67,31 @@ def main(): docs_files = [f for f in files if f.filename.startswith("docs/")] deploy_url = settings.deploy_url.rstrip("/") - links: list[str] = [] + links: list[LinkData] = [] for f in docs_files: match = re.match(r"docs/(.*)", f.filename) - assert match + if not match: + continue path = match.group(1) if path.endswith("index.md"): - path = path.replace("index.md", "") + use_path = path.replace("index.md", "") else: - path = path.replace(".md", "/") - link = f"{deploy_url}/{path}" + use_path = path.replace(".md", "/") + link = LinkData( + previous_link=f"https://{site_domain}/{use_path}", + preview_link=f"{deploy_url}/{use_path}", + ) links.append(link) - links.sort() + links.sort(key=lambda x: x.preview_link) message = f"📝 Docs preview for commit {settings.commit_sha} at: {deploy_url}" if links: message += "\n\n### Modified Pages\n\n" - message += "\n".join([f"* {link}" for link in links]) + for link in links: + message += f"* {link.preview_link}" + message += f" - ([before]({link.previous_link}))" + message += "\n" print(message) use_pr.as_issue().create_comment(message)