Release Notes Sync #2
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: Release Notes Sync | |
| on: | |
| schedule: | |
| - cron: '15 2 * * *' | |
| workflow_dispatch: | |
| concurrency: | |
| group: docs-release-notes-sync | |
| cancel-in-progress: false | |
| jobs: | |
| sync_release_notes: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| NODE_VERSION: '22' | |
| DOCS_RELEASE_NOTES_REPOSITORY: HagiCode-org/release-notes | |
| DOCS_RELEASE_NOTES_TOKEN: ${{ secrets.DOCS_RELEASE_NOTES_TOKEN || github.token }} | |
| DOCS_RELEASE_NOTES_ALLOW_STALE_ON_SOURCE_ERROR: 'true' | |
| steps: | |
| - name: Checkout docs repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Synchronize release notes | |
| run: npm run release-notes:sync | |
| - name: Verify release-notes tests | |
| run: npm run test:release-notes | |
| - name: Build docs | |
| run: NODE_ENV=production npm run build | |
| env: | |
| CLARITY_PROJECT_ID: ${{ secrets.CLARITY_PROJECT_ID }} | |
| - name: Commit synchronized outputs | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add src/data/release-notes.index.json src/content/docs/release-notes src/content/docs/en/release-notes | |
| if git diff --cached --quiet; then | |
| echo "No release-note changes to commit." | |
| exit 0 | |
| fi | |
| git commit -m "chore(release-notes): sync docs release notes" | |
| git push |