-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (44 loc) · 1.47 KB
/
update-and-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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