Skip to content

[Hackathon Q1 2024] Generate Rules Overview Page #13

[Hackathon Q1 2024] Generate Rules Overview Page

[Hackathon Q1 2024] Generate Rules Overview Page #13

Workflow file for this run

name: Update Rules Page
on:
pull_request:
branches: [main]
paths:
- 'styles/**'
- '.github/workflows/update-rules.yml'
jobs:
generate_markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyyaml
- name: Run script to generate Markdown
run: python scripts/update-rules-page.py
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add RULES.md
TIMESTAMP=$(date -u +"%Y-%m-%d")
git commit -m "Update RULES.md - $TIMESTAMP." || echo "No changes to commit."
git config pull.rebase true
git pull origin ${{ github.head_ref }}
git push origin HEAD:${{ github.head_ref }}