fix(docs): correct vlagent example (#1682) #581
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: Update docs | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| paths: | |
| - 'docs/**' | |
| - 'README.md' | |
| - '.github/workflows/docs.yaml' | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-docs: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: docs | |
| url: https://docs.victoriametrics.com/operator | |
| steps: | |
| - name: Checkout operator repo | |
| uses: actions/checkout@v5 | |
| with: | |
| path: __vm-operator | |
| - name: Checkout docs repo | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: VictoriaMetrics/vmdocs | |
| ref: main | |
| token: ${{ secrets.VM_BOT_GH_TOKEN }} | |
| path: __vm-docs | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: '__vm-operator/go.mod' | |
| check-latest: true | |
| cache: true | |
| id: go | |
| - name: Import GPG key | |
| id: import-gpg | |
| uses: crazy-max/ghaction-import-gpg@v6 | |
| with: | |
| gpg_private_key: ${{ secrets.VM_BOT_GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.VM_BOT_PASSPHRASE }} | |
| git_user_signingkey: true | |
| git_commit_gpgsign: true | |
| git_config_global: true | |
| - name: Copy docs | |
| id: update | |
| run: | | |
| make docs | |
| # Sync markdown files and pictures | |
| rsync -zarv \ | |
| --include="*/" \ | |
| --include="*.webp" \ | |
| --include="*.md" \ | |
| --exclude="*" \ | |
| docs/ ../__vm-docs/content/operator/ | |
| echo "SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT | |
| working-directory: __vm-operator | |
| - name: Push to vmdocs | |
| run: | | |
| git config --global user.name "${{ steps.import-gpg.outputs.email }}" | |
| git config --global user.email "${{ steps.import-gpg.outputs.email }}" | |
| if [[ -n $(git status --porcelain) ]]; then | |
| git add content/operator | |
| git commit -S -m "sync docs with VictoriaMetrics/operator commit: ${{ steps.update.outputs.SHORT_SHA }}" | |
| git push | |
| fi | |
| working-directory: __vm-docs | |
| env: | |
| GH_TOKEN: "${{ secrets.VM_BOT_GH_TOKEN }}" | |
| GITHUB_TOKEN: "${{ secrets.VM_BOT_GH_TOKEN }}" |