From 47bb38fd98a1f6c744fca000b97faba87a8f989c Mon Sep 17 00:00:00 2001 From: Jack Cherng Date: Sat, 2 Mar 2024 16:37:41 +0800 Subject: [PATCH] chore: simplify CI Signed-off-by: Jack Cherng --- .github/workflows/docs.yml | 6 ++---- .github/workflows/python.yml | 3 +-- Makefile | 4 ++++ docs/Makefile | 6 +++++- docs/requirements.txt | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9ed2c41a..224acee0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,8 +18,7 @@ jobs: - run: python -m pip install -U uv - run: | cd docs/ - uv v && . .venv/bin/activate - make install build + make ci-install build job_deploy: # deploy only on the "stable" branch if: ${{ github.ref == 'refs/heads/stable' }} @@ -33,5 +32,4 @@ jobs: - run: python -m pip install -U uv - run: | cd docs/ - uv v && . .venv/bin/activate - make install deploy + make ci-install deploy diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8872f729..da223a19 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -47,5 +47,4 @@ jobs: - name: Do linting run: | - uv v && . .venv/bin/activate - make install ci-check + make ci-install ci-check diff --git a/Makefile b/Makefile index 6f572ed5..120e0a84 100644 --- a/Makefile +++ b/Makefile @@ -24,3 +24,7 @@ ci-fix: ruff check --fix . @echo "========== fix: ruff (format) ==========" ruff format . + +.PHONY: ci-install +ci-install: + uv pip install --system -r requirements.txt diff --git a/docs/Makefile b/docs/Makefile index 45dc53b4..c31f07fd 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -2,7 +2,7 @@ all: build .PHONY: install -install: pip-compile +install: uv pip install -r requirements.txt .PHONY: pip-compile @@ -24,3 +24,7 @@ deploy: .phony: clean clean: rm -rf site/ + +.PHONY: ci-install +ci-install: + uv pip install --system -r requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt index 6a757851..9957d053 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -68,7 +68,7 @@ pygments==2.17.2 # via mkdocs-material pymdown-extensions==10.7 # via mkdocs-material -python-dateutil==2.9.0 +python-dateutil==2.9.0.post0 # via ghp-import pytz==2024.1 # via mkdocs-git-revision-date-localized-plugin