@@ -20,38 +20,43 @@ jobs:
20
20
generate_toc_formats :
21
21
runs-on : ubuntu-latest
22
22
steps :
23
- # Step 1: Check out the repository
23
+
24
+ # Step 1 - Check out the repository
24
25
- name : Check out repository
25
26
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
29
34
uses : actions/setup-python@v3
30
35
with :
31
36
python-version : ' 3.x'
32
37
33
- # Step 3: Install Python dependencies
38
+ # Step 4 - Install python dependencies
34
39
- name : Install dependencies
35
40
run : |
36
41
python -m pip install --upgrade pip
37
42
pip install -r 'scripts/table-of-contents-generator/requirements.txt'
38
43
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
41
46
run : |
42
47
yarn prep-from-master
43
48
python -u ./scripts/table-of-contents-generator/toc_gen.py --dir="docs/en/interfaces/formats" --single-toc --out="table-of-contents-files" --ignore "_snippets"
44
49
45
- # Step 5 - Fail the workflow if script returns exit code 1
50
+ # Step 6 - Fail the workflow if script returns exit code 1
46
51
- name : Check exit code
47
52
run : |
48
53
if [[ "${{ steps.toc_gen.outcome }}" == "failure" ]]; then
49
54
echo "Ran into trouble generating a table of contents. See the logs for details."
50
55
exit 1
51
56
fi
52
57
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
55
60
id : check_changes
56
61
run : |
57
62
git status -u
63
68
echo "has_changes=false" >> $GITHUB_OUTPUT
64
69
fi
65
70
66
- # Step 7 - Commit and Push generated Table Of Contents files
71
+ # Step 8 - Commit and Push generated Table Of Contents files
67
72
- uses : stefanzweifel/git-auto-commit-action@v5
68
73
env :
69
74
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments