style: remove unneeded comments #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy the latest documentation | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Version to be deployed | |
| required: true | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| deploy: | |
| name: Deploy the latest documentation | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: 3.x | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git@9.5.44-insiders-4.53.14 | |
| pip install -r docs/build/requirements.txt | |
| env: | |
| GH_TOKEN: ${{ secrets.MKDOCS_AQUA_BOT }} | |
| - name: Configure the git user | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Deploy the latest documents from new tag push | |
| if: ${{ github.event.inputs.version == '' }} | |
| run: | | |
| VERSION=$(echo "$GITHUB_REF" | sed -e "s#refs/tags/##g") | |
| mike deploy --push --update-aliases ${VERSION%.*} latest | |
| - name: Deploy the latest documents from manual trigger | |
| if: ${{ github.event.inputs.version != '' }} | |
| env: | |
| DOCS_VERSION: ${{ github.event.inputs.version }} | |
| run: mike deploy --push --update-aliases "$DOCS_VERSION" latest | |
| # This workflow is used to trigger the trivy-www deployment | |
| trigger-trivy-www-deploy: | |
| needs: deploy | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Trigger update_version workflow in trivy-telemetry | |
| env: | |
| # Use ORG_REPO_TOKEN instead of GITHUB_TOKEN | |
| # This allows triggering workflows in other repositories | |
| GH_TOKEN: ${{ secrets.ORG_REPO_TOKEN }} | |
| run: | | |
| gh workflow run build-docs.yml \ | |
| --repo "$GITHUB_REPOSITORY_OWNER/trivy-www" \ | |
| --ref main \ | |
| --field "from_version=$GITHUB_REF_NAME" |