Skip to content

Commit 1f72284

Browse files
committed
update deploy action for PyTorchLightning only
1 parent 848d963 commit 1f72284

File tree

5 files changed

+11
-77
lines changed

5 files changed

+11
-77
lines changed

โ€Ž.github/workflows/deploy-gh-pages.yml

+8-65
Original file line numberDiff line numberDiff line change
@@ -9,80 +9,23 @@ defaults:
99
run:
1010
shell: bash
1111

12-
env:
13-
FREEZE_REQUIREMENTS: "1"
14-
TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html"
15-
PYPI_CACHE_DIR: "_pip-wheels"
16-
1712
jobs:
1813
make-html:
1914
runs-on: ubuntu-latest
20-
container:
21-
image: pytorchlightning/pytorch_lightning:docs
22-
strategy:
23-
fail-fast: false
24-
matrix:
25-
pkg-name: ["app", "fabric", "pytorch"]
2615
steps:
27-
- uses: actions/checkout@v3
16+
- name: Make Sphinx documentation for PyTorchLightning
17+
uses: actions/checkout@v3
2818
with:
2919
submodules: true
30-
31-
- name: pip wheels cache
32-
uses: actions/cache/restore@v3
33-
with:
34-
path: ${{ env.PYPI_CACHE_DIR }}
35-
key: pypi_wheels
36-
37-
- name: Install package & dependencies
38-
run: |
39-
mkdir -p $PYPI_CACHE_DIR # in case cache was not hit
40-
ls -lh $PYPI_CACHE_DIR
41-
mkdir -p pypi_pkgs # in case template is not pulled
42-
pip --version
43-
pip install -U -r requirements.txt \
44-
-f pypi_pkgs/ -f $PYPI_CACHE_DIR -f ${TORCH_URL}
45-
pip install -U -r requirements/${{ matrix.pkg-name }}/docs.txt \
46-
-f pypi_pkgs/ -f $PYPI_CACHE_DIR -f ${TORCH_URL}
47-
pip list
48-
shell: bash
49-
50-
- name: Make Documentation
51-
working-directory: ./docs/source-${{ matrix.pkg-name }}
52-
run: make html --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going"
53-
54-
- name: Keep artifact
55-
id: keep-artifact
56-
run: python -c "print('DAYS=' + str(7 if '${{ github.event_name }}'.startswith('pull_request') else 0))" >> $GITHUB_OUTPUT
57-
58-
- name: Upload built docs
59-
uses: actions/upload-artifact@v3
20+
- uses: actions/setup-python@v4
6021
with:
61-
name: docs-${{ matrix.pkg-name }}-${{ github.sha }}
62-
path: docs/build/html/
63-
retention-days: ${{ steps.keep-artifact.outputs.DAYS }}
64-
65-
- name: Dump handy wheels
66-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
22+
python-version: '3.10'
23+
cache: 'pip'
24+
- run: |
25+
git config --global --add safe.directory '*' # to allow sphinx to write to any directory
26+
make docs
6727
continue-on-error: true
68-
uses: ./.github/actions/pip-wheels
69-
with:
70-
wheel-dir: ${{ env.PYPI_CACHE_DIR }}
71-
torch-url: ${{ env.TORCH_URL }}
72-
cache-key: "pypi_wheels"
7328
74-
deploy-docs:
75-
needs: [make-html]
76-
runs-on: ubuntu-latest
77-
strategy:
78-
fail-fast: false
79-
matrix:
80-
pkg-name: ["app", "fabric", "pytorch"]
81-
steps:
82-
- uses: actions/download-artifact@v3
83-
with:
84-
name: docs-${{ matrix.pkg-name }}-${{ github.sha }}
85-
path: docs/build/html/
8629
- name: Deploy to gh-pages branch
8730
uses: peaceiris/actions-gh-pages@v3
8831
with:

โ€ŽMakefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ clean:
2929

3030
docs:
3131
git submodule update --init --recursive # get Notebook submodule
32-
pip install -qq lightning # install (stable) Lightning from PyPI instead of src
33-
pip install -qq -r requirements/app/base.txt
34-
pip install -qq -r requirements/pytorch/docs.txt
32+
pip install -r requirements.txt
3533
cd docs/source-pytorch && $(MAKE) html --jobs $(nproc) && cd ../../
3634

3735
update:

โ€Ždocs/source-app/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
#
124124
# This is also used if you do content translation via gettext catalogs.
125125
# Usually you set "language" from the command line for these cases.
126-
language = 'en'
126+
language = "ko"
127127

128128
# List of patterns, relative to source-app directory, that match files and
129129
# directories to ignore when looking for source-app files.

โ€Ždocs/source-pytorch/generated/CHANGELOG.md

-7
This file was deleted.

โ€Žrequirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# instead of install from source, use the pre-built wheel
2-
lightning
2+
lightning==2.0.5
33

44
# the default package dependencies
55
-r ./requirements/app/base.txt

0 commit comments

Comments
ย (0)