From fc40438f35981c2c01813ceac0bff2c808e7ca83 Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Wed, 8 Jan 2025 23:17:53 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=90=8D=20migrate=20from=20Poetry=20?= =?UTF-8?q?to=20uv=20for=20Python=20setup=20and=20dependency=20installatio?= =?UTF-8?q?n=20in=20doc=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Onuralp SEZER --- .github/workflows/publish-docs.yml | 14 +++++--------- .github/workflows/test-doc.yml | 13 ++++--------- pyproject.toml | 2 +- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 08b7f5d0f..62a465d99 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -33,17 +33,13 @@ jobs: with: fetch-depth: 0 - - name: ๐Ÿ Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + - name: ๐Ÿ Install uv and set Python ${{ matrix.python-version }} + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - - name: ๐Ÿ“œ Setup Poetry - uses: abatilo/actions-poetry@3765cf608f2d4a72178a9fc5b918668e542b89b1 # v4.0.0 - - name: ๐Ÿ“ฆ Install dependencies - run: | - poetry install --with=docs + run: uv pip install -r pyproject.toml --extra docs - name: โš™๏ธ Configure git for github-actions run: | @@ -53,10 +49,10 @@ jobs: - name: ๐Ÿš€ Deploy Development Docs if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' run: | - MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} poetry run mike deploy --push develop + MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} uv run mike deploy --push develop - name: ๐Ÿš€ Deploy Release Docs if: github.event_name == 'release' && github.event.action == 'published' run: | latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) - MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} poetry run mike deploy --push --update-aliases $latest_tag latest + MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} uv run mike deploy --push --update-aliases $latest_tag latest diff --git a/.github/workflows/test-doc.yml b/.github/workflows/test-doc.yml index 6b2012d8f..27714df8d 100644 --- a/.github/workflows/test-doc.yml +++ b/.github/workflows/test-doc.yml @@ -23,18 +23,13 @@ jobs: with: fetch-depth: 0 - - name: ๐Ÿ Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 + - name: ๐Ÿ Install uv and set Python ${{ matrix.python-version }} + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - - name: ๐Ÿ“œ Setup Poetry - uses: abatilo/actions-poetry@3765cf608f2d4a72178a9fc5b918668e542b89b1 # v4.0.0 - - name: ๐Ÿ—๏ธ Install dependencies - run: | - poetry install --with=docs + run: uv pip install -r pyproject.toml --extra docs - name: ๐Ÿงช Test Docs Build - run: | - poetry run mkdocs build --verbose + run: uv run mkdocs build --verbose diff --git a/pyproject.toml b/pyproject.toml index 3ca6ab19f..784f2975c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -235,4 +235,4 @@ supervision = ["py.typed"] [build-system] requires = ["setuptools >= 61.0"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta"