Update servers.json #18
This file contains 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: Update Last Updated | |
on: | |
push: | |
paths: | |
- 'github.json' | |
- 'forum.json' | |
- 'servers.json' | |
workflow_dispatch: | |
jobs: | |
update-last-updated: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Update index.html and servers.html | |
run: | | |
python update.py | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Commit and push changes | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git add index.html | |
git add servers.html | |
git diff-index --quiet HEAD || git commit -m "Automatically update Last Updated date" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |