Skip to content

Commit

Permalink
tweaking command
Browse files Browse the repository at this point in the history
revert uv changes

using secrets
  • Loading branch information
samuelcolvin committed Nov 13, 2024
1 parent bd99159 commit af59ac6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ jobs:
enable-cache: true

- run: uv sync --python 3.12 --frozen --group docs
- run: uv run --frozen mkdocs build
- run: docs
if: github.repository_owner != 'pydantic'

- run: make docs-insiders
if: github.repository_owner == 'pydantic'
env:
PPPR_TOKEN: ${{ secrets.PPPR_TOKEN }}

test:
name: test on ${{ matrix.python-version }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ env*/
/postgres-data/
.DS_Store
/pydantic_ai_examples/.chat_app_messages.jsonl
.docs-insiders-install
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,29 @@ docs:
docs-serve:
uv run mkdocs serve --no-strict

# install insiders packages for docs
.PHONY: .docs-insiders-install # install insiders packages for docs
.docs-insiders-install:
uv add \
--no-sync \
--extra-index-url https://pydantic:${PPPR_TOKEN}@pppr.pydantic.dev/simple/ \
--group docs \
mkdocs-material mkdocstrings-python
@echo 'installing insiders packages'
@uv pip install \
--extra-index-url https://pydantic:${PPPR_TOKEN}@pppr.pydantic.dev/simple/ \
mkdocs-material mkdocstrings-python

.PHONY: docs-insiders # Build the documentation using insiders packages
docs-insiders: .docs-insiders-install
uv run mkdocs build
uv run --no-sync mkdocs build

.PHONY: docs-serve-insiders # Build and serve the documentation using insiders packages
docs-serve-insiders: .docs-insiders-install
uv run mkdocs serve
uv run --no-sync mkdocs serve

.PHONY: cf-pages-build # Install uv, install dependencies and build the docs, used on CloudFlare Pages
cf-pages-build:
curl -LsSf https://astral.sh/uv/install.sh | sh
${HOME}/.local/bin/uv python install 3.12
${HOME}/.local/bin/uv sync --python 3.12 --frozen --group docs
${HOME}/.local/bin/uv pip install \
--extra-index-url https://pydantic:${PPPR_TOKEN}@pppr.pydantic.dev/simple/ \
mkdocs-material mkdocstrings-python
${HOME}/.local/bin/uv run --no-sync mkdocs build

.PHONY: all
Expand Down
2 changes: 2 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit af59ac6

Please sign in to comment.