Skip to content

Commit cf45894

Browse files
committed
ci: publish generated test inventory page with GitHub Pages
Add a GitHub Actions workflow to generate and publish the HTML test inventory page from the repository contents. Highlights: - run on main branch updates, weekly schedule, and manual dispatch - generate the inventory page from the Python helper - publish the generated site through GitHub Pages - make the inventory available as a continuously refreshed project view Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
1 parent c94858d commit cf45894

1 file changed

Lines changed: 70 additions & 0 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Publish Test Inventory Page
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 3 * * 1"
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- "Runner/suites/**"
12+
- "scripts/generate_test_inventory_html.py"
13+
- ".github/workflows/test-inventory-pages.yml"
14+
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: true
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Python
33+
uses: actions/setup-python@v6
34+
with:
35+
python-version: "3.11"
36+
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install requests
41+
42+
- name: Generate HTML inventory
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
run: |
46+
mkdir -p _site
47+
python scripts/generate_test_inventory_html.py > _site/index.html
48+
49+
- name: Add .nojekyll
50+
run: touch _site/.nojekyll
51+
52+
- name: Configure GitHub Pages
53+
uses: actions/configure-pages@v5
54+
55+
- name: Upload Pages artifact
56+
uses: actions/upload-pages-artifact@v4
57+
with:
58+
path: _site
59+
60+
deploy:
61+
environment:
62+
name: github-pages
63+
url: ${{ steps.deployment.outputs.page_url }}
64+
runs-on: ubuntu-latest
65+
needs: build
66+
67+
steps:
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)