Update news #181
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 news | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 */6 * * *' | |
| jobs: | |
| update-news: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Install dependencies | |
| run: pnpm install | |
| working-directory: ./code | |
| - name: Fetch RSS feeds | |
| run: pnpm start | |
| working-directory: ./code | |
| - name: Cluster with AI | |
| run: pnpm ai | |
| working-directory: ./code | |
| env: | |
| OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} | |
| - name: Translate clusters | |
| run: pnpm translate | |
| working-directory: ./code | |
| env: | |
| OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name "github-actions" | |
| git config --global user.email "github-actions@github.com" | |
| git add code/rss_output/ code/rss_output_cluster/ | |
| git diff --staged --quiet || git commit -m "Update news $(date -u +'%Y-%m-%d %H:%M UTC')" | |
| git pull --rebase | |
| git push |