Generate Package Index #198
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: Generate Package Index | |
| on: | |
| # Allows triggering this workflow from another repository | |
| repository_dispatch: | |
| types: [generate-index] # Define an event type | |
| # Allows manual triggering from the Actions tab | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '1 0 * * *' | |
| jobs: | |
| build-and-deploy-index: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout code (this repo, if needed for scripts/configs) | |
| uses: actions/checkout@v4 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Build the python index | |
| run: ./build-index.sh | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './dist/' # Upload the directory containing the index | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |