Skip to content

pull request!

pull request! #11

Workflow file for this run

name: Update README Table
on:
push:
paths:
- 'journals.yaml'
- 'code/*_table'
- '.github/workflows/update-table.yaml'
pull_request:
paths:
- 'journals.yaml'
- 'code/*_table'
- '.github/workflows/update-table.yaml'
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Run table embedding script
run: code/embed_table
- name: Check for changes in README.md
id: git-check
run: |
git diff --exit-code README.md
echo "README_CHANGED=$?" >> $GITHUB_ENV
- name: Commit changes
if: env.README_CHANGED == '1'
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add README.md
git commit -m "Updated rendered table"
- name: Push changes
if: env.README_CHANGED == '1'
run: git push