Sync Blog Posts from SEObot #263
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: Sync Blog Posts from SEObot | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| sync-blogs-from-seobot: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install | |
| # - run: bun run blogs:sync_seobot | |
| # env: | |
| # SEOBOT_API_KEY: ${{ secrets.SEOBOT_API_KEY }} | |
| - name: Commit changes | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add -A | |
| git diff --quiet && git diff --staged --quiet || git commit -m "chore: sync blog posts from SEObot" | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| branch: ${{ github.ref }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: bun run blogs:delete_broken_all | |
| - run: bun run blogs:fix_locales_all | |
| - run: bun run fix_code_languages_all | |
| - name: Commit changes | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add -A | |
| git commit -m "chore: delete broken blogs, fix locales and code languages" | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| branch: ${{ github.ref }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |