Skip to content

.

. #6

name: Update README with File Structure
on:
push:
branches:
- main
permissions:
contents: write
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Generate file structure
run: |
# Создаем временный файл с новой структурой
echo '## File Structure' > temp_structure.md
tree -L 2 >> temp_structure.md
# Обновляем README.md, заменяя старую структуру
awk '/## File Structure/{found=1; print; getline; while(getline) if($0 ~ /^## /) {print; found=0; break} else {}} !found' README.md > updated_readme.md
cat temp_structure.md >> updated_readme.md
mv updated_readme.md README.md
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions