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

docs: inject version selector to HTML docs #2886

Merged
merged 3 commits into from
Jan 6, 2025
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
24 changes: 15 additions & 9 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,26 @@ jobs:
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCS_SA_KEY }}

- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.GCS_PROJECT }}

# Uploading docs as archive to GCS, so they can be as backup
- name: Upload docs as archive to GCS 🪣
if: startsWith(github.ref, 'refs/tags/')
working-directory: docs/build
run: |
zip ${{ github.ref_name }}.zip -r html/
gsutil cp ${{ github.ref_name }}.zip ${GCP_TARGET}

- name: Inject version selector
working-directory: docs/build
run: |
pip install -q wget
python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/inject-selector-script.py
python inject-selector-script.py html torchmetrics

# Uploading docs to GCS, so they can be served on lightning.ai
- name: Upload docs/metrics/stable to GCS 🪣
if: startsWith(github.ref, 'refs/heads/release/')
Expand All @@ -118,11 +132,3 @@ jobs:
- name: Upload docs/metrics/release to GCS 🪣
if: startsWith(github.ref, 'refs/tags/')
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 🪣
if: startsWith(github.ref, 'refs/tags/')
working-directory: docs/build
run: |
zip ${{ github.ref_name }}.zip -r html/
gsutil cp ${{ github.ref_name }}.zip ${GCP_TARGET}
Loading