41
41
fail-fast : false
42
42
matrix :
43
43
pkg-name : ["app", "fabric", "pytorch"]
44
- check : ["html", "doctest", "linkcheck"]
44
+ target : ["html", "doctest", "linkcheck"]
45
45
env :
46
46
DOCS_COPY_NOTEBOOKS : 1
47
+ ARTIFACT_DAYS : 0
47
48
steps :
48
49
- uses : actions/checkout@v4
49
50
with :
69
70
if : ${{ matrix.pkg-name == 'pytorch' }}
70
71
timeout-minutes : 5
71
72
run : |
72
- sudo apt-get update
73
+ sudo apt-get update --fix-missing
73
74
sudo apt-get install -y pandoc texlive-latex-extra dvipng texlive-pictures
74
75
- name : Install package & dependencies
75
76
timeout-minutes : 20
@@ -84,37 +85,23 @@ jobs:
84
85
timeout-minutes : 10
85
86
run : pip install -q -r _notebooks/.actions/requires.txt
86
87
87
- - name : Test Examples in Docs
88
- if : ${{ matrix.check == 'doctest' }}
89
- working-directory : ./docs/source-${{ matrix.pkg-name }}
90
- run : |
91
- make doctest
92
- make coverage
93
-
94
- - name : Check External Links
95
- if : ${{ matrix.check == 'linkcheck' }}
96
- working-directory : ./docs/source-${{ matrix.pkg-name }}
97
- run : make linkcheck SPHINXOPTS="--keep-going"
98
-
99
88
- name : Full build for deployment
100
89
if : github.event_name == 'push'
101
90
run : echo "DOCS_FETCH_ASSETS=1" >> $GITHUB_ENV
102
- - name : Make Documentation
103
- if : ${{ matrix.check == 'html' }}
91
+ - name : Make ${{ matrix.target }}
104
92
working-directory : ./docs/source-${{ matrix.pkg-name }}
105
- run : make html --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going"
93
+ run : make ${{ matrix.target }} --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going"
106
94
107
95
- name : Keep artifact
108
- id : keep-artifact
109
- run : python -c "print('DAYS=' + str(7 if '${{ github.event_name }}'.startswith('pull_request') else 0))" >> $GITHUB_OUTPUT
110
-
96
+ if : github.event_name == 'pull_request'
97
+ run : echo "ARTIFACT_DAYS=7" >> $GITHUB_ENV
111
98
- name : Upload built docs
112
- if : ${{ matrix.check == 'html' }}
99
+ if : ${{ matrix.target == 'html' }}
113
100
uses : actions/upload-artifact@v3
114
101
with :
115
102
name : docs-${{ matrix.pkg-name }}-${{ github.sha }}
116
103
path : docs/build/html/
117
- retention-days : ${{ steps.keep-artifact.outputs.DAYS }}
104
+ retention-days : ${{ env.ARTIFACT_DAYS }}
118
105
119
106
- name : Dump handy wheels
120
107
if : github.event_name == 'push' && github.ref == 'refs/heads/master'
0 commit comments