Skip to content

Create a custom pip package index for publishing Python packages to GitHub Pages

License

Notifications You must be signed in to change notification settings

girder/create-pip-index-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a Custom Pip Index for Python Package Wheels

Use the action to create a pip package index from a direcory of wheels (*.whl)

Use the Action:

- name: Make package index
  uses: girder/create-pip-index-action@main
  with:
    package_directory: dist/

Example workflow that publishes you wheel to a package index on GitHub Pages:

name: Publish Wheel to GitHub Pages

on:
  workflow_dispatch:
  push:
    branches:
      - main

jobs:
  publish-wheel:
    name: Publish Wheel to GH Pages
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.8"
      - name: Build Weel
        run: |
          pip install wheel
          python setup.py bdist_wheel
      - name: Make package index
        uses: girder/create-pip-index-action@main
        with:
          package_directory: dist/
      - name: Deploy to GH Pages
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: dist/

Inputs

  • package_directory: Path to the directory containing the wheels/packages. A new index.html file will be placed in this direcory.