reverted script changes #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |