Assets update #440
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: 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: 16 | |
- 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/style.css ./comuni_theme/css/styles.css | |
cp ./design-comuni-pagine-statiche/dist/assets/script/scripts.js ./comuni_theme/js/scripts.js | |
rm -rf design-comuni-pagine-statiche | |
cd comuni_theme | |
npm i | |
npm run build | |
git add css/styles.css js/scripts.js css/bootstrap-italia.min.css js/bootstrap-italia.bundle.min.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 |