Skip to content

Update root index.html #1611

Update root index.html

Update root index.html #1611

name: Update root index.html
on:
workflow_run:
workflows: ["Build and run project", "Load testing"]
types:
- completed
jobs:
rewrite-root-index:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout to gh-pages
uses: actions/checkout@v4
with:
ref: 'gh-pages'
- name: Install dependency
run: pip install yattag
- name: Remove redundant files
run: python3 .scripts/delete-useless-files.py
continue-on-error: true
- name: Generate new index.html
run: python3 .scripts/generate-root-html.py
- name: Configure Git
run: |
git config --local user.name "gh-pages-script"
git config --local user.email "gh-pages-script@example.com"
- name: Commit changes
run: |
git add -u
git add index.html
git commit -m "Add changes from GitHub Actions" || echo "No changes to commit"
- name: Push changes
run: |
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}