codeceptjs-release #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
| # Triggered by the codeceptjs/CodeceptJS repo on release. | |
| # Regenerates all docs/releases and pushes to `main`, which makes Vercel deploy. | |
| name: Update content | |
| on: | |
| # Fired from the CodeceptJS repo: | |
| # curl -X POST -H "Authorization: Bearer $PAT" \ | |
| # -H "Accept: application/vnd.github+json" \ | |
| # https://api.github.com/repos/codeceptjs/website/dispatches \ | |
| # -d '{"event_type":"codeceptjs-release"}' | |
| repository_dispatch: | |
| types: [codeceptjs-release] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: update-content | |
| cancel-in-progress: true | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Refresh docs, unified API and releases | |
| run: bunx bunosh docs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Commit & push to main | |
| run: | | |
| git config user.name "codeceptjs-bot" | |
| git config user.email "bot@codecept.io" | |
| git add -A | |
| if git diff --cached --quiet; then | |
| echo "No content changes — nothing to deploy." | |
| else | |
| git commit -m "chore: sync docs, unified API and releases from CodeceptJS" | |
| git push origin HEAD:main | |
| fi |