Flag updated docs #25
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: Flag updated docs | |
| on: | |
| schedule: | |
| - cron: "30 3 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| mark-updated-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Mark recently updated docs | |
| env: | |
| SIGNIFICANT_LINE_THRESHOLD: "20" | |
| WINDOW_DAYS: "30" | |
| run: python .github/scripts/mark_recent_docs.py | |
| - name: Detect changes | |
| id: changes | |
| run: | | |
| if git status --porcelain | grep .; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Commit and push updates | |
| if: steps.changes.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add user-guide developer-guide | |
| git commit -m "chore: update sidebar highlights for docs" | |
| git push |