ejrcarr is updating README.md #21
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-readme | |
run-name: ${{ github.actor }} is updating README.md | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
- 'problems.json' | |
jobs: | |
update-readme: | |
name: Update README.md | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }} | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install bs4 | |
- name: Run update script | |
run: python Scripts/update.py | |
- name: Commit and push if changes | |
run: | | |
git config --global user.name 'Evan Carr' | |
git config --global user.email '[email protected]' | |
git add README.md problems.json | |
git commit -m "Automated README.md update" || exit 0 | |
git push # Push back to the GitHub repository |