|
76 | 76 | --fail-if-improved \ |
77 | 77 | --fail-if-new-news-nit |
78 | 78 | - name: 'Collect HTML IDs' |
| 79 | + if: github.event_name == 'pull_request' |
79 | 80 | run: python Doc/tools/check-html-ids.py collect Doc/build/html -o Doc/build/html-ids-head.json.gz |
80 | 81 | - name: 'Upload HTML IDs' |
| 82 | + if: github.event_name == 'pull_request' |
81 | 83 | uses: actions/upload-artifact@v7 |
82 | 84 | with: |
83 | 85 | name: html-ids-head |
|
87 | 89 | check-html-ids: |
88 | 90 | name: 'Check for removed HTML IDs' |
89 | 91 | needs: build-doc |
90 | | - runs-on: ubuntu-latest |
91 | | - timeout-minutes: 30 |
92 | | - steps: |
93 | | - - name: 'Check out base commit' |
94 | | - uses: actions/checkout@v6 |
95 | | - with: |
96 | | - persist-credentials: false |
97 | | - ref: ${{ github.event.pull_request.base.sha || github.event.before }} |
98 | | - - name: 'Set up Python' |
99 | | - uses: actions/setup-python@v6 |
100 | | - with: |
101 | | - python-version: '3' |
102 | | - cache: 'pip' |
103 | | - cache-dependency-path: 'Doc/requirements.txt' |
104 | | - - name: 'Install build dependencies' |
105 | | - run: make -C Doc/ venv |
106 | | - - name: 'Build HTML documentation' |
107 | | - run: make -C Doc/ SPHINXOPTS="--quiet" html |
108 | | - - name: 'Collect HTML IDs' |
109 | | - run: python Doc/tools/check-html-ids.py collect Doc/build/html -o /tmp/html-ids-base.json.gz |
110 | | - - name: 'Download PR base HTML IDs' |
111 | | - uses: actions/download-artifact@v8 |
112 | | - with: |
113 | | - name: html-ids-head.json.gz |
114 | | - path: /tmp |
115 | | - - name: 'Check for removed HTML IDs' |
116 | | - run: >- |
117 | | - python Doc/tools/check-html-ids.py check |
118 | | - /tmp/html-ids-base.json.gz /tmp/html-ids-head.json.gz |
119 | | - # XXX: When an exclude file is added, update this to use it: |
120 | | - # --exclude-file Doc/tools/removed-ids.txt |
| 92 | + if: github.event_name == 'pull_request' |
| 93 | + uses: ./.github/workflows/reusable-check-html-ids.yml |
121 | 94 |
|
122 | 95 | # Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release |
123 | 96 | doctest: |
|
0 commit comments