Skip to content

Update list.txt

Update list.txt #25

Workflow file for this run

name: Deploy GitHub Pages
on:
push:
branches:
- main # Triggers when commits or merges happen in main
paths:
- 'list.txt' # Triggers when the (input) list.txt file changes
- 'supplementary.json'
- 'base_script.py'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install requests Jinja2
- name: Run script to generate index.html
run: python base_script.py
- name: Commit changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add docs/
git diff --cached --quiet && echo "No changes to commit" || git commit -m "Update index.html via GitHub Actions"
- name: Push changes
if: success()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push