Fixed css to ensure version switcher dropdown is solid (#227) #30
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: Build Percona Operator for MySQL docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: Deploy docs | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| #Pull the latest changes | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 # fetch all commits/branches | |
| #Prepare the env | |
| - name: Set up Python | |
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
| with: | |
| python-version: '3.x' | |
| #Extract release from YAML | |
| - name: Extract release from variables | |
| run: | | |
| RELEASE=$(grep '^release:' variables.yml | awk '{print $2}' | tr -d "'") | |
| echo "RELEASE=$RELEASE" >> $GITHUB_ENV | |
| # PRUNED_VERSION=$(grep '^pruned_version:' variables.yml | awk '{print $2}' | tr -d "'") | |
| # echo "PRUNED_VERSION"=$"PRUNED_VERSION" >> $GITHUB_ENV | |
| #Set up MkDocs | |
| - name: Install MkDocs | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install wheel | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| # Configure git auth right before it's needed, scoped to this checkout only, | |
| # so the credential isn't live on disk for the earlier setup steps. | |
| - name: Configure git | |
| env: | |
| ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} | |
| run: | | |
| git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $(printf '%s' "x-access-token:${ROBOT_TOKEN}" | base64 -w0)" | |
| git config user.name "GitHub Action" | |
| git config user.email "github-action@users.noreply.github.com" | |
| # Deploy docs | |
| - name: Deploy docs | |
| env: | |
| MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.ROBOT_TOKEN }} | |
| run: | | |
| mike deploy $RELEASE -u latest -b publish -p | |
| mike set-default latest -b publish -p | |
| # mike delete $PRUNED_VERSION -b publish -p | |
| # Drop the credential as soon as it's no longer needed | |
| - name: Clear git credentials | |
| if: always() | |
| run: git config --local --unset-all http.https://github.com/.extraheader || true | |