Skip to content

Publish Test Inventory Page #4

Publish Test Inventory Page

Publish Test Inventory Page #4

name: Publish Test Inventory Page
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * 1"
push:
branches:
- main
paths:
- "Runner/suites/**"
- "scripts/generate_test_inventory_html.py"
- ".github/workflows/test-inventory-pages.yml"
permissions:
contents: read
pages: write
id-token: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Generate HTML inventory
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p _site
python scripts/generate_test_inventory_html.py > _site/index.html
- name: Add .nojekyll
run: touch _site/.nojekyll
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: _site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4