Код IT Загрузка примера кода…

YAML main.yaml
name: Weekly Sitemap Update

on:
  schedule:
    - cron: '0 3 * * 1'  # Понедельник, 3:00 UTC

jobs:
  update-sitemap:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4
      - run: npm install
      - run: npm run generate-sitemap
      - name: Commit sitemap
        run: |
          git config --global user.name 'github-actions[bot]'
          git config --global user.email 'github-actions[bot]@users.noreply.github.com'
          git add sitemap.xml
          git diff --staged --quiet || git commit -m "chore: update sitemap"
          git push
name: Weekly Sitemap Update

on:
  schedule:
    - cron: '0 3 * * 1'  # Понедельник, 3:00 UTC

jobs:
  update-sitemap:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4
      - run: npm install
      - run: npm run generate-sitemap
      - name: Commit sitemap
        run: |
          git config --global user.name 'github-actions[bot]'
          git config --global user.email 'github-actions[bot]@users.noreply.github.com'
          git add sitemap.xml
          git diff --staged --quiet || git commit -m "chore: update sitemap"
          git push