@@ -184,6 +184,8 @@ jobs:
184184 fail-fast : false
185185 matrix :
186186 pkg-name : ["app", "fabric", "pytorch"]
187+ env :
188+ GCP_TARGET : " gs://lightning-docs-${{ matrix.pkg-name }}"
187189 steps :
188190 - uses : actions/download-artifact@v3
189191 with :
@@ -203,14 +205,22 @@ jobs:
203205 # Uploading docs to GCS, so they can be served on lightning.ai
204206 - name : Upload docs/${{ matrix.pkg-name }}/stable to GCS 🪣
205207 if : startsWith(github.ref, 'refs/heads/release/')
206- run : gsutil -m rsync -d -R docs/build/html/ gs://lightning-docs-${{ matrix.pkg-name } }/stable
208+ run : gsutil -m rsync -d -R docs/build/html/ ${GCP_TARGET }/stable
207209
208210 # Uploading docs to GCS, so they can be served on lightning.ai
209211 - name : Upload docs/${{ matrix.pkg-name }}/latest to GCS 🪣
210212 if : github.ref == 'refs/heads/master'
211- run : gsutil -m rsync -d -R docs/build/html/ gs://lightning-docs-${{ matrix.pkg-name } }/latest
213+ run : gsutil -m rsync -d -R docs/build/html/ ${GCP_TARGET }/latest
212214
213215 # Uploading docs to GCS, so they can be served on lightning.ai
214216 - name : Upload docs/${{ matrix.pkg-name }}/release to GCS 🪣
215217 if : startsWith(github.ref, 'refs/tags/')
216- run : gsutil -m rsync -d -R docs/build/html/ gs://lightning-docs-${{ matrix.pkg-name }}/${{ github.ref_name }}
218+ run : gsutil -m rsync -d -R docs/build/html/ ${GCP_TARGET}/${{ github.ref_name }}
219+
220+ # Uploading docs as archive to GCS, so they can be as backup
221+ - name : Upload docs as archive to GCS 🪣
222+ if : startsWith(github.ref, 'refs/tags/')
223+ working-directory : docs/build
224+ run : |
225+ zip ${{ github.ref_name }}.zip -r html/
226+ gsutil cp ${{ github.ref_name }}.zip ${GCP_TARGET}
0 commit comments