forked from italia/design-comuni-wordpress-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.21 KB
/
update-assets-comuni.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
name: Assets update
on:
schedule:
- cron: '30 18 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup Git
uses: fregante/setup-git-user@v1
- name: Run assets update
run: |
git clone https://github.com/italia/design-comuni-pagine-statiche
cd design-comuni-pagine-statiche && npm i && npm run build && cd ..
cp ./design-comuni-pagine-statiche/dist/assets/css/bootstrap-italia-comuni.css ./assets/css/bootstrap-italia-comuni.min.css
cp ./design-comuni-pagine-statiche/dist/assets/script/scripts.js ./assets/js/comuni.js
rm -rf design-comuni-pagine-statiche
npm i
npm run build
git add assets/css/bootstrap-italia-comuni.css assets/js/comuni.js
git commit -m "chore(deps): update assets"
git checkout .
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
title: "chore(deps): update assets"
branch: feature/update-assets