docs: pre-install lai sphinx theme (#18764)

This commit is contained in:
Jirka Borovec 2023-10-10 00:20:03 +09:00 committed by GitHub
parent 1d5851ffe2
commit 0e04760ebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 6 deletions

View File

@ -34,7 +34,10 @@ runs:
fp = 'requirements.dump'
with open(fp) as fopen:
lines = [ln.strip() for ln in fopen.readlines()]
# prevent collisions with version appendix
lines = [ln.split('+')[0] for ln in lines if '-e ' not in ln]
# drop sphinx theme package
lines = [ln for ln in lines if 'sphinx-theme' not in ln]
with open(fp, 'w') as fopen:
fopen.writelines([ln + os.linesep for ln in lines])
shell: python

View File

@ -57,6 +57,7 @@ jobs:
run: |
pip install awscli
aws s3 sync --no-sign-request s3://sphinx-packages/ ${PYPI_LOCAL_DIR}
pip install lai-sphinx-theme -U -f ${PYPI_LOCAL_DIR}
- name: pip wheels cache
uses: actions/cache/restore@v3
@ -75,7 +76,6 @@ jobs:
run: |
mkdir -p ${PYPI_CACHE_DIR} # in case cache was not hit
ls -lh ${PYPI_CACHE_DIR}
mkdir -p ${PYPI_LOCAL_DIR} # in case template is not pulled
pip install .[all] -U -r requirements/${{ matrix.pkg-name }}/docs.txt \
-f ${PYPI_LOCAL_DIR} -f ${PYPI_CACHE_DIR} -f ${TORCH_URL}
pip list
@ -164,7 +164,7 @@ jobs:
# Uploading docs to GCS, so they can be served on lightning.ai
- name: Upload docs/${{ matrix.pkg-name }}/release to GCS 🪣
if: startsWith(github.ref, 'refs/tags/')
run: gsutil -m rsync -d -R docs/build/html/ ${GCP_TARGET}/${{ github.ref_name }}
run: gsutil -m rsync -d -R docs/build/html/ ${GCP_TARGET}/${{ github.ref_name }}
# Uploading docs as archive to GCS, so they can be as backup
- name: Upload docs as archive to GCS 🪣

View File

@ -1,3 +1 @@
-r ../docs.txt
lai-sphinx-theme

View File

@ -17,3 +17,5 @@ sphinxcontrib-video ==0.2.0
jinja2 <3.2.0
lightning-utilities >=0.9.0
lai-sphinx-theme

View File

@ -1,4 +1,3 @@
-r ../docs.txt
lai-sphinx-theme
tensorboard

View File

@ -3,4 +3,5 @@
nbformat # used for generate empty notebook
ipython[notebook] <8.7.0
setuptools<58.0 # workaround for `error in ipython setup command: use_2to3 is invalid.`
lai-sphinx-theme
-r ../../_notebooks/.actions/requires.txt