forked from mautic/mautic
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.11 KB
/
build-grapesjs-assets.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
name: Build JS files for dist folder
on:
# Allow manually triggering this workflow
workflow_dispatch:
schedule:
# Run every day at 10 AM UTC
- cron: '0 10 * * *'
defaults:
run:
working-directory: plugins/GrapesJsBuilderBundle
permissions:
contents: read
jobs:
build-js:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
if: github.repository == 'mautic/mautic'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Build JS dist files
run: npm run build
# Checks if the JS files have been updated as a result of the NPM build,
# and creates a PR if necessary.
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: 'Auto-update GrapesJS generated JS dist files'
title: 'Update GrapesJS generated JS dist files'
delete-branch: true