Skip to content

Commit 4804c23

Browse files
authored
Merge pull request #3143 from ClickHouse/Blargian-patch-7
Update table_of_contents.yml
2 parents 831850d + a0349e0 commit 4804c23

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

.github/workflows/table_of_contents.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,43 @@ jobs:
2020
generate_toc_formats:
2121
runs-on: ubuntu-latest
2222
steps:
23-
# Step 1: Check out the repository
23+
24+
# Step 1 - Check out the repository
2425
- name: Check out repository
2526
uses: actions/checkout@v3
26-
27-
# Step 2 - Setup Python
28-
- name: Set up Python
27+
28+
# Step 2 - Pull changes
29+
- name: Pull remote Changes
30+
run: git pull
31+
32+
# Step 3 - Setup python
33+
- name: Set up python
2934
uses: actions/setup-python@v3
3035
with:
3136
python-version: '3.x'
3237

33-
# Step 3: Install Python dependencies
38+
# Step 4 - Install python dependencies
3439
- name: Install dependencies
3540
run: |
3641
python -m pip install --upgrade pip
3742
pip install -r 'scripts/table-of-contents-generator/requirements.txt'
3843
39-
# Step 4 - Pull main repo docs, run script to generate TOCs:
40-
- name: Generate TOCs
44+
# Step 5 - Pull main repo docs, run script to generate TOCs:
45+
- name: Generate table of contents files
4146
run: |
4247
yarn prep-from-master
4348
python -u ./scripts/table-of-contents-generator/toc_gen.py --dir="docs/en/interfaces/formats" --single-toc --out="table-of-contents-files" --ignore "_snippets"
4449
45-
# Step 5 - Fail the workflow if script returns exit code 1
50+
# Step 6 - Fail the workflow if script returns exit code 1
4651
- name: Check exit code
4752
run: |
4853
if [[ "${{ steps.toc_gen.outcome }}" == "failure" ]]; then
4954
echo "Ran into trouble generating a table of contents. See the logs for details."
5055
exit 1
5156
fi
5257
53-
# Step 6 - Check if anything was actually updated
54-
- name: Check for Changes
58+
# Step 7 - Check if anything was actually updated
59+
- name: Check for changes
5560
id: check_changes
5661
run: |
5762
git status -u
@@ -63,7 +68,7 @@ jobs:
6368
echo "has_changes=false" >> $GITHUB_OUTPUT
6469
fi
6570
66-
# Step 7 - Commit and Push generated Table Of Contents files
71+
# Step 8 - Commit and Push generated Table Of Contents files
6772
- uses: stefanzweifel/git-auto-commit-action@v5
6873
env:
6974
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)