Upgrade npm packages #15
This file contains 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: Upgrade npm packages | |
defaults: | |
run: | |
working-directory: "./Website" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
upgrade-packages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
cache-dependency-path: "./Website/package-lock.json" | |
- name: Upgrade Packages | |
run: | | |
npm install -g npm-check-updates | |
ncu -u | |
npm install | |
- name: Commit and push changes to the repository | |
run: | | |
git config user.name "dependabot" | |
git config user.email "49699333+dependabot[bot]@users.noreply.github.com" | |
git add . | |
git diff-index --quiet HEAD || git commit -m "build(deps): Upgraded npm packages" | |
git push |