Skip to content

CI - update node packages and build #43

CI - update node packages and build

CI - update node packages and build #43

name: CI - update node packages and build
on:
schedule:
- cron: '0 1 * * 5'
workflow_dispatch:
jobs:
update-node-pacakges:
name: update node packages and build
runs-on: ubuntu-latest
steps:
- name: Set up env πŸ› οΈ
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Node.js βš™οΈ
uses: actions/setup-node@v4
with:
node-version: latest
- name: Print versions
run: |-
echo $CURRENT_DATE
echo "node version: $(node --version) $(which node)"
echo "npw version: $(npm --version) $(which npm)"
- name: Install ncu πŸ”€
run: npm install npm-check-updates
- name: Upgrade packages πŸ”€
run: npm run update:modules
- name: Prettier and ESLint πŸ”€
run: npm run format
- name: Build πŸ”€
run: npm run build
- name: Deploy πŸ”€
run: npm run copy:deploy
- name: Commit and create PR πŸ”€
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.WORKFLOW_TOKEN }}
title: 'build(deps): Upgrade NPM packages (automated)'
branch: 'build-deps-upgrade-npm-packages-automated-${{ env.CURRENT_DATE }}'
commit-message: 'build(deps): upgrade NPM packages (automated)'
assignees: Rabbid76
draft: false