Merge pull request #192 from ut-code/new-chat-ui #11
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 Docs Revision And Database | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: write | |
| jobs: | |
| check-docs: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: npx drizzle-kit migrate | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| - run: npx tsx ./scripts/checkDocs.ts --write | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| - name: Configure git for push | |
| run: | | |
| git remote set-url origin "https://github-actions:${GITHUB_TOKEN}@github.com/${{ github.repository }}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Commit build output | |
| run: | | |
| git add . | |
| git diff --staged --exit-code || (git commit -m "[ci] update revisions.yml" && git push origin main) | |
| # The `||` ensures the commit and push only happen if there are changes (git diff exits with non-zero) |