chore: use uv for docs action

This commit is contained in:
Noortheen Raja 2024-04-22 12:21:18 +05:30 committed by Noorhteen Raja NJ
parent 499f35428a
commit a61860e623
2 changed files with 7 additions and 7 deletions

View file

@ -18,6 +18,8 @@ jobs:
build:
if: github.repository_owner == 'xonsh'
runs-on: ubuntu-latest
env:
UV_CACHE_DIR: .cache/uv
name: Xonsh docs to gh-pages
steps:
- uses: actions/checkout@v4
@ -27,10 +29,9 @@ jobs:
python-version: "3.10"
- uses: yezz123/setup-uv@v4
- name: set current week
uses: mathiasvr/command-output@v2.0.0
id: current_week
with:
run: python -c "from datetime import date; print(date.today().isocalendar().week)"
run: echo WEEK=$(date +%V) >>$GITHUB_ENV
shell: bash
- name: Cache uv pip for a week
id: cache-uv
uses: actions/cache@v4

View file

@ -47,16 +47,15 @@ jobs:
python-version: ${{ matrix.python-version }}
- uses: yezz123/setup-uv@v4
- name: set current week
uses: mathiasvr/command-output@v2.0.0
id: current_week
with:
run: python -c "from datetime import date; print(date.today().isocalendar().week)"
run: echo WEEK=$(date +%V) >>$GITHUB_ENV
shell: bash
- name: Cache uv pip for a week
id: cache-uv
uses: actions/cache@v4
with:
path: ${{ env.UV_CACHE_DIR }}
key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}-${{ steps.current_week.outputs.stdout }}
key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}-${{ env.WEEK }}
restore-keys: ${{ runner.os }}-uv-
- name: Install dependencies
run: uv pip install --system -e ".[test]"