Skip to content

Commit 822d25b

Browse files
authored
Update table_of_contents.yml
1 parent 040abe0 commit 822d25b

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

.github/workflows/table_of_contents.yml

Lines changed: 15 additions & 10 deletions
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+
2324
# 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)