Assets update #754
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: 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 |