Build JS files for dist folder #113
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: 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@v3 | |
- 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 |