Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/docs: primary installation of fetch template #2162

Merged
merged 5 commits into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 10 additions & 25 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
check: [html, doctest, linkcheck]
target: [html, doctest, linkcheck]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
Expand All @@ -48,7 +48,7 @@ jobs:
pypi-dir: ${{ env.PYPI_CACHE }}

- name: Install Latex
if: ${{ matrix.check == 'html' }}
if: ${{ matrix.target == 'html' }}
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
run: |
sudo apt-get update --fix-missing
Expand All @@ -59,42 +59,27 @@ jobs:
run: |
pip install awscli
aws s3 sync --no-sign-request s3://sphinx-packages/ dist/
pip install lai-sphinx-theme -U -f dist/
- name: Install package & dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get install -y cmake
pip --version
pip install . -U -r requirements/_docs.txt \
--find-links="${PYPI_CACHE}" --find-links="${TORCH_URL}" --find-links="dist/"
--find-links="dist/" --find-links="${PYPI_CACHE}" --find-links="${TORCH_URL}"
pip list
- name: Test Examples in Documentation
if: ${{ matrix.check == 'doctest' }}
working-directory: ./docs
run: |
make doctest --debug --jobs $(nproc)
make coverage
- name: Check External Links
if: ${{ matrix.check == 'linkcheck' }}
working-directory: ./docs
env:
SPHINX_MOCK_REQUIREMENTS: 1
run: make linkcheck --jobs $(nproc) SPHINXOPTS="--keep-going"

- name: Full build for deployment
if: github.event_name != 'pull_request'
run: echo "SPHINX_FETCH_ASSETS=1" >> $GITHUB_ENV
- name: Make Documentation
if: ${{ matrix.check == 'html' }}
- name: make ${{ matrix.target }}
if: ${{ matrix.target != 'html' }}
working-directory: ./docs
run: make html --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going"
run: make ${{ matrix.target }} --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going"

- name: Upload built docs
if: ${{ matrix.check == 'html' && github.event_name == 'push' }}
if: ${{ matrix.target == 'html' && github.event_name != 'pull_request' }}
uses: actions/upload-artifact@v3
with:
name: docs-${{ github.sha }}
name: docs-${{ matrix.target }}-${{ github.sha }}
path: docs/build/
retention-days: ${{ steps.keep-artifact.outputs.DAYS }}

Expand All @@ -114,7 +99,7 @@ jobs:
steps:
- uses: actions/download-artifact@v3
with:
name: docs-${{ github.sha }}
name: docs-html-${{ github.sha }}
path: docs/build/

- name: Authenticate to Google Cloud
Expand Down
Loading