mirror of
https://github.com/two-torial/two-torial.git
synced 2026-03-21 21:54:09 -05:00
Fix (hopefully) CI workflow with uv cached env
This commit is contained in:
parent
febd140030
commit
d04e4df15a
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
|
|
@ -1,25 +1,43 @@
|
||||||
name: Build
|
name: Build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- main
|
- main
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: "3.x"
|
||||||
- name: Install pip dependencies
|
|
||||||
run: pip install --user -r requirements.txt
|
- name: Install uv
|
||||||
|
run: |
|
||||||
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: Cache uv environment
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: .venv
|
||||||
|
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-uv-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: uv sync --frozen
|
||||||
|
|
||||||
- name: Build and deploy site
|
- name: Build and deploy site
|
||||||
run: mkdocs gh-deploy --force
|
run: uv run mkdocs gh-deploy --force
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user