generate a multi-level PyPi index as per PEP 503 (#1) #153
This file contains 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 index.html | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
event_type: github-pages | |
push: | |
branches: | |
- "main" | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: false | |
jobs: | |
deploy-index: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Generate index | |
run: | | |
python -m venv venv | |
venv/bin/pip install -r ./requirements.txt | |
mkdir -p github-pages | |
venv/bin/python generate_index.py --url-path-prefix=/simple github-pages/simple | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: github-pages | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |