Merge pull request #2011 from cyberstormdotmu/loganaden-patch-sandbox #1
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: Render SEPs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "seps/**/*.md" | |
| - "scripts/render-seps.ts" | |
| pull_request: | |
| paths: | |
| - "seps/**/*.md" | |
| - "scripts/render-seps.ts" | |
| # Allow manual trigger | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| render-seps: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| - name: Render SEPs | |
| run: npm run generate:seps | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| if [[ -n "$(git status --porcelain docs/community/seps/ docs/snippets/badge.mdx docs/docs.json)" ]]; then | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| fi | |
| # On push to main, commit any changes | |
| - name: Commit changes | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.changes.outputs.has_changes == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add docs/community/seps/ docs/snippets/badge.mdx docs/docs.json | |
| git commit -m "docs: auto-render SEPs documentation" | |
| git push | |
| # On PR, verify docs are up to date | |
| - name: Verify SEPs are up to date | |
| if: github.event_name == 'pull_request' | |
| run: npm run check:seps |