add grant reference pages #9
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 Reference Documentation | |
| on: | |
| # schedule: | |
| # # Run daily at 2 AM UTC | |
| # - cron: '0 2 * * *' | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'scripts/generate_reference_*' | |
| - 'tasks.d/generate.yaml' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-docs: | |
| name: Update Reference Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| persist-credentials: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Bootstrap environment | |
| uses: ./.github/actions/bootstrap | |
| - name: Generate reference documentation | |
| run: | | |
| echo "Generating reference documentation..." | |
| .tool/task generate:reference | |
| - name: Check for changes | |
| id: check-changes | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| if git diff --quiet content/docs/reference/commands/; then | |
| echo "No changes detected" | |
| echo "has-changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Changes detected in reference documentation" | |
| echo "has-changes=true" >> $GITHUB_OUTPUT | |
| # Show what changed | |
| echo "Changed files:" | |
| git diff --name-only content/docs/reference/commands/ | |
| # Show diff stats | |
| echo "Diff summary:" | |
| git diff --stat content/docs/reference/commands/ | |
| fi | |
| - uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0 | |
| id: generate-token | |
| with: | |
| app_id: ${{ secrets.TOKEN_APP_ID }} | |
| private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }} | |
| - name: Create Pull Request | |
| if: steps.check-changes.outputs.has-changes == 'true' | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| signoff: true | |
| commit-message: | | |
| Update cli/config reference documentation (auto generated) | |
| title: "📚 Update cli/config reference documentation" | |
| body: | | |
| ## 🤖 Automated Reference Documentation Update | |
| This PR contains automatic updates to the reference documentation generated from the latest container images. | |
| ### Changes Include: | |
| - Updated CLI command documentation | |
| - Updated configuration documentation | |
| - Latest version information and help text | |
| ⚡ This PR was automatically generated by the `update-reference-docs` workflow. | |
| branch: update-reference-docs-${{ github.run_number }} | |
| branch-suffix: timestamp | |
| labels: | | |
| documentation | |
| automated | |
| reference | |
| draft: false | |
| delete-branch: true |