Skip to content

setup Pants to make development easier (#4) #154

setup Pants to make development easier (#4)

setup Pants to make development easier (#4) #154

Workflow file for this run

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: Initialize Pants launcher
uses: pantsbuild/actions/init-pants@56efcdb79721bc7726edf542e324468033e4e21c
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py3.9
named-caches-hash: ${{ hashFiles('3rdparty/python/default.lock') }}
- name: Generate index
run: |
mkdir -p github-pages
pants run :generate_index -- --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