|
| 1 | +# Copyright (c) 2026, NVIDIA CORPORATION. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +name: Release docs |
| 15 | +on: |
| 16 | + workflow_dispatch: |
| 17 | + inputs: |
| 18 | + dry-run: |
| 19 | + description: Whether to run the workflow in dry-run mode |
| 20 | + required: true |
| 21 | + type: boolean |
| 22 | + default: true |
| 23 | + publish-as-latest: |
| 24 | + description: Publish as Latest stable version. |
| 25 | + required: false |
| 26 | + type: boolean |
| 27 | + default: true |
| 28 | + docs-version-override: |
| 29 | + description: Docs version if commit is not tagged |
| 30 | + required: false |
| 31 | + type: string |
| 32 | + default: "" |
| 33 | + update-version-picker: |
| 34 | + description: Update version picker. |
| 35 | + required: false |
| 36 | + type: boolean |
| 37 | + default: true |
| 38 | + notify-emails: |
| 39 | + description: Email addresses to send the notification to. Format as "me@me.com,you@you.com". |
| 40 | + required: false |
| 41 | + type: string |
| 42 | + github-ref: |
| 43 | + description: Github ref to checkout |
| 44 | + required: false |
| 45 | + type: string |
| 46 | + default: "" |
| 47 | + workflow_call: |
| 48 | + inputs: |
| 49 | + dry-run: |
| 50 | + description: Whether to run the workflow in dry-run mode |
| 51 | + required: false |
| 52 | + type: boolean |
| 53 | + default: true |
| 54 | + publish-as-latest: |
| 55 | + description: Publish as Latest stable version. |
| 56 | + required: false |
| 57 | + type: boolean |
| 58 | + default: true |
| 59 | + docs-version-override: |
| 60 | + description: Docs version if commit is not tagged |
| 61 | + required: false |
| 62 | + type: string |
| 63 | + default: "" |
| 64 | + update-version-picker: |
| 65 | + description: Update version picker. |
| 66 | + required: false |
| 67 | + type: boolean |
| 68 | + default: true |
| 69 | + notify-emails: |
| 70 | + description: Email addresses to send the notification to. Format as "me@me.com,you@you.com". |
| 71 | + required: false |
| 72 | + type: string |
| 73 | + github-ref: |
| 74 | + description: Github ref to checkout |
| 75 | + required: false |
| 76 | + type: string |
| 77 | + default: "" |
| 78 | + |
| 79 | +jobs: |
| 80 | + build-docs: |
| 81 | + uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@v0.67.0 |
| 82 | + with: |
| 83 | + ref: ${{ inputs.github-ref }} |
| 84 | + sync-all: true |
| 85 | + |
| 86 | + publish-docs: |
| 87 | + runs-on: ubuntu-latest |
| 88 | + needs: [build-docs] |
| 89 | + steps: |
| 90 | + - uses: actions/checkout@v6 |
| 91 | + with: |
| 92 | + repository: NVIDIA-NeMo/FW-CI-templates |
| 93 | + ref: v0.74.0 |
| 94 | + path: FW-CI-templates |
| 95 | + |
| 96 | + - uses: ./FW-CI-templates/.github/actions/publish-docs |
| 97 | + # This workflow runs either on main, or on a version tag. Any other git ref will lead |
| 98 | + # to an error. |
| 99 | + # If its on main, it will publish to "latest" directory in Akamai. |
| 100 | + # If its on a versioned tag, it will extract the version number from the tag (strip `v` prefix) |
| 101 | + # and publish to the versioned directory in Akamai. |
| 102 | + with: |
| 103 | + dry-run: ${{ inputs.dry-run }} |
| 104 | + artifacts-name: docs-html |
| 105 | + artifacts-path: _build/html |
| 106 | + emails-csv: ${{ inputs.notify-emails && format('{0},{1}', vars.docs_release_emails, inputs.notify-emails) || vars.docs_release_emails }} |
| 107 | + overwrite-latest-on-tag: ${{ inputs.publish-as-latest }} |
| 108 | + docs-version-override: ${{ inputs.docs-version-override }} |
| 109 | + update-version-picker: ${{ inputs.update-version-picker }} |
| 110 | + run-on-version-tag-only: ${{ github.ref_name != 'main' }} |
| 111 | + request-name: emerging-optimizers-publish-docs-${{ github.run_id }} |
| 112 | + aws-region: ${{ vars.DOCS_AWS_REGION }} |
| 113 | + aws-role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }} |
| 114 | + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 115 | + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 116 | + akamai-host: ${{ secrets.AKAMAI_HOST }} |
| 117 | + akamai-client-token: ${{ secrets.AKAMAI_CLIENT_TOKEN }} |
| 118 | + akamai-client-secret: ${{ secrets.AKAMAI_CLIENT_SECRET }} |
| 119 | + akamai-access-token: ${{ secrets.AKAMAI_ACCESS_TOKEN }} |
| 120 | + s3-target-root: ${{ secrets.S3_BUCKET_NAME }} |
| 121 | + s3-target-path: nemo/emerging-optimizers |
0 commit comments