Skip to content

Commit

Permalink
Create update_readme_workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
burnt-exe authored Jun 6, 2024
1 parent f23c9ca commit 71ed10a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/update_readme_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update README

on:
push:
branches:
- main

jobs:
update_readme:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: pip install requests

- name: Run Python script to generate table
run: python generate_table.py > table.md

- name: Update README
run: |
sed -i '/<!-- START_SECTION: courses_badges -->/,/<!-- END_SECTION: courses_badges -->/c\<!-- START_SECTION: courses_badges -->\n' table.md '\n<!-- END_SECTION: courses_badges -->/' README.md
sed -i '/<!-- START_SECTION: courses_badges -->/r table.md' README.md

0 comments on commit 71ed10a

Please sign in to comment.