---
jobs:
  update-list:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.x
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip

      - name: Run AutoIndex script
        run: |
          python AutoIndex.py

      - name: Commit changes
        run: |
          git config --global user.name 'Gitea Bot'
          git config --global user.email 'bot@example.com'
          git add readme.md
          git commit -m 'Update file listing'
          git push
name: Auto List Update
'on':
  push:
    branches:
      - main