Skip to content

Commit d1408e6

Browse files
author
alexander.andriishin
committed
docs: migrate 8 README files to a single NRG template
Replaces 8 hand-maintained READMEs (en + de/es/fr/hi/ko/pt_br/zh_tw) with a single README.src.md, regenerated in CI by nanolaba/nrg-action@v1 on push to main. All 8 outputs are byte-identical to the originals (modulo a 2-line auto-generated header NRG injects at the top). Drift-check job runs in mode: check on PRs that touch any README*.md or the template, failing the build with a unified diff when a contributor edits a generated file directly.
1 parent b0ba8dd commit d1408e6

10 files changed

Lines changed: 1537 additions & 0 deletions

File tree

.github/workflows/nrg.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Regenerate READMEs
2+
on:
3+
push:
4+
branches: [main]
5+
paths:
6+
- 'README.src.md'
7+
- '.github/workflows/nrg.yml'
8+
pull_request:
9+
paths:
10+
- 'README.md'
11+
- 'README.de.md'
12+
- 'README.es.md'
13+
- 'README.fr.md'
14+
- 'README.hi.md'
15+
- 'README.ko.md'
16+
- 'README.pt_br.md'
17+
- 'README.zh_tw.md'
18+
- 'README.src.md'
19+
permissions:
20+
contents: write
21+
jobs:
22+
regenerate:
23+
if: github.event_name == 'push'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
- uses: nanolaba/nrg-action@v1
30+
with:
31+
file: README.src.md
32+
nrg-version: '1.1'
33+
- name: Commit regenerated READMEs
34+
run: |
35+
if [ -n "$(git status --porcelain README.md README.de.md README.es.md README.fr.md README.hi.md README.ko.md README.pt_br.md README.zh_tw.md)" ]; then
36+
git config user.name "github-actions[bot]"
37+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
38+
git add README.md README.de.md README.es.md README.fr.md README.hi.md README.ko.md README.pt_br.md README.zh_tw.md
39+
git commit -m "docs: regenerate READMEs from README.src.md"
40+
git push
41+
fi
42+
drift-check:
43+
if: github.event_name == 'pull_request'
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: nanolaba/nrg-action@v1
48+
with:
49+
file: README.src.md
50+
mode: check
51+
nrg-version: '1.1'

README.de.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
# Ultimativer Python-Lernführer
24

35
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/huangsam/ultimate-python/ci.yml)](https://github.com/huangsam/ultimate-python/actions)

README.es.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
# Guía de estudio "Python Definitivo"
24

35
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/huangsam/ultimate-python/ci.yml)](https://github.com/huangsam/ultimate-python/actions)

README.fr.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
# Guide d’étude Python ultime
24

35
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/huangsam/ultimate-python/ci.yml)](https://github.com/huangsam/ultimate-python/actions)

README.hi.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
# अल्टीमेट Python अध्ययन गाइड
24

35
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/huangsam/ultimate-python/ci.yml)](https://github.com/huangsam/ultimate-python/actions)

README.ko.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
# Ultimate Python 학습 가이드
24

35
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/huangsam/ultimate-python/ci.yml)](https://github.com/huangsam/ultimate-python/actions)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
# Ultimate Python study guide
24

35
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/huangsam/ultimate-python/ci.yml)](https://github.com/huangsam/ultimate-python/actions)

README.pt_br.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
# Ultimate Python - O seu guia de estudos de Python definitivo
24

35
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/huangsam/ultimate-python/ci.yml)](https://github.com/huangsam/ultimate-python/actions)

README.src.md

Lines changed: 1470 additions & 0 deletions
Large diffs are not rendered by default.

README.zh_tw.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- This file was automatically generated by Nanolaba Readme Generator (NRG) 1.1 -->
2+
<!-- Visit https://github.com/nanolaba/readme-generator for details -->
13
# Ultimate Python 學習大綱
24

35
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/huangsam/ultimate-python/ci.yml)](https://github.com/huangsam/ultimate-python/actions)

0 commit comments

Comments
 (0)