Skip to content

Commit

Permalink
update python docs action
Browse files Browse the repository at this point in the history
  • Loading branch information
emgeee committed Nov 14, 2024
1 parent 381d56f commit f7e1e78
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 29 deletions.
53 changes: 28 additions & 25 deletions .github/workflows/python-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,44 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: py-denormalized
working-directory: ./py-denormalized
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.1"
enable-cache: true
cache-dependency-glob: "uv.lock"
# enable-cache: true
# cache-dependency-glob: "py-denormalized/uv.lock"

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "py-denormalized/pyproject.toml"

- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --all-extras --dev
- run: pdoc -t pdocs/ python/denormalized/ -o pdocs/_build
run: uv sync --only-group docs
- run: uv run pdoc -t pdocs/ python/denormalized/ -o pdocs/_build

- uses: actions/upload-pages-artifact@v3
with:
path: pdocs/_build
# - uses: actions/upload-pages-artifact@v3
# with:
# path: pdocs/_build

# Deploy the artifact to GitHub pages.
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
deploy:
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: py-denormalized
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
# deploy:
# needs: build
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./py-denormalized
# permissions:
# pages: write
# id-token: write
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# steps:
# - id: deployment
# uses: actions/deploy-pages@v4
7 changes: 6 additions & 1 deletion py-denormalized/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ dependencies = [
"datafusion>=40.1.0",
]

[project.optional-dependencies]
feast = ["feast"]

[dependency-groups]
dev = [
"pdoc>=15.0.0",
Expand All @@ -25,7 +28,9 @@ dev = [
"pdoc>=15.0.0",
"pip>=24.3.1",
]
feast = ["feast"]
docs = [
"pdoc>=15.0.0",
]

[tool.maturin]
python-source = "python"
Expand Down
12 changes: 9 additions & 3 deletions py-denormalized/uv.lock

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

0 comments on commit f7e1e78

Please sign in to comment.