File tree Expand file tree Collapse file tree 2 files changed +26
-5
lines changed
Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 2222 # a pull request then we can checkout the head.
2323 fetch-depth : 2
2424
25- # If this run was triggered by a pull request event, then checkout
26- # the head of the pull request instead of the merge commit.
27- - run : git checkout HEAD^2
28- if : ${{ github.event_name == 'pull_request' }}
29-
3025 # Initializes the CodeQL tools for scanning.
3126 - name : Initialize CodeQL
3227 uses : github/codeql-action/init@v1
Original file line number Diff line number Diff line change 1+
12name : Documentation check
23
34on : [pull_request]
2829 pip install -e .
2930 - name : Build ${{ matrix.doc-type }} documentation
3031 run : sphinx-build -Wnb ${{ matrix.doc-type }} docs/source/ docs/build-${{ matrix.doc-type }}/
32+
33+ - name : Prepare documentation artifact
34+ run : |
35+ # Define Path to Upload
36+ if [ "${{ matrix.doc-type }}" = html ]; then echo "art_path=docs/build-html" >> $GITHUB_ENV; fi
37+ if [ "${{ matrix.doc-type }}" = latex ]; then echo "art_path=docs/build-latex/MicroStructPy.pdf" >> $GITHUB_ENV; fi
38+ if [ "${{ matrix.doc-type }}" = epub ]; then echo "art_path=docs/build-epub/MicroStructPy.epub" >> $GITHUB_ENV; fi
39+
40+ # Build PDF
41+ if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-fonts-recommended; fi
42+ if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-latex-recommended; fi
43+ if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-lang-english; fi
44+ if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install texlive-xetex; fi
45+ if [ "${{ matrix.doc-type }}" = latex ]; then sudo apt install latexmk; fi
46+ if [ "${{ matrix.doc-type }}" = latex ]; then cd docs/build-latex; fi
47+ if [ "${{ matrix.doc-type }}" = latex ]; then make; fi
48+ if [ "${{ matrix.doc-type }}" = latex ]; then cd -; fi
49+
50+
51+ - name : Upload artifact
52+ uses : actions/upload-artifact@v3
53+ with :
54+ name : microstructpy_${{ matrix.doc-type }}_documentation
55+ path : ${{ env.art_path }}
56+
You can’t perform that action at this time.
0 commit comments