name: Update Dependencies
on:
  schedule:
    - cron: '0 0 1 * *'

jobs:
  update-dep:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '16.x'
      - name: Update dependencies
        run: |
          npx -p npm-check-updates ncu -u
          npm install
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v4
        with:
          commit-message: Update dependencies
          title: Update dependencies
          body: |
            - Dependency updates
          branch: update-dependencies
          author: github-actions <noreply@github.com>
