Deploy PyPI Index to GitHub Pages #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy PyPI Index to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Build index | |
| run: | | |
| uv run dumb-pypi \ | |
| --package-list PACKAGES \ | |
| --output-dir _site \ | |
| --packages-url ../../packages \ | |
| --title "Multirotor PyPI Index" | |
| # remote-hosted wheels: one list file per upstream base URL | |
| uv run dumb-pypi --package-list PACKAGES.nvidia --output-dir _remote \ | |
| --packages-url https://developer.nvidia.com/w/compute/redist/jp/v512/pytorch \ | |
| --title "Multirotor PyPI Index" | |
| for pkg in torch torchvision; do | |
| cp -r _remote/simple/$pkg _site/simple/ | |
| cp -r _remote/pypi/$pkg _site/pypi/ | |
| done | |
| cp -r packages _site/ | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |