https://github.com/elstudio/actions-js-build
GitHub Actions for running Javascript build tools and committing file changes
https://github.com/elstudio/actions-js-build
github-actions grunt gulp javascript npm
Last synced: 27 days ago
JSON representation
GitHub Actions for running Javascript build tools and committing file changes
- Host: GitHub
- URL: https://github.com/elstudio/actions-js-build
- Owner: elstudio
- Created: 2018-12-22T14:57:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-22T19:01:00.000Z (about 4 years ago)
- Last Synced: 2025-03-17T19:21:21.236Z (30 days ago)
- Topics: github-actions, grunt, gulp, javascript, npm
- Language: Shell
- Homepage:
- Size: 66.4 KB
- Stars: 54
- Watchers: 3
- Forks: 18
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-actions - JS Build Actions - Run Grunt or Gulp build tasks and commit file changes. (Community Resources / Frontend Tools)
- fucking-awesome-actions - JS Build Actions - Run Grunt or Gulp build tasks and commit file changes. (Community Resources / Frontend Tools)
- awesome-workflows - JS Build Actions - Run Grunt or Gulp build tasks and commit file changes. (Community Resources / Frontend Tools)
README
# GitHub Actions for JavaScript build tools (Gulp, Grunt, NPM -- and git)
Run JS build tasks with Gulp, Grunt or NPM, then commit any changed files and push them back to your original repository.
Perfect for Grunt or Gulp tasks that do CSS (or SASS/LESS) compilation or JS transpilation. If your build task changes files, these actions are for you.
This repository contains two actions that may be used independently -- typically one after another:
- **build** (elstudio/actions-js-build/build@v4): Looks for a gulpfile.js or Gruntfile.js in the working directory, then installs any required npm packages and runs the appropriate build tool. If it finds neither gulp or grunt, the script runs npm. Set the workflow `args` arguments to run the tasks of your choice.
- **commit** (elstudio/actions-js-build/commit@v4): Commits any file changes, and pushes them back to the current branch of the origin repository on GitHub.## Usage
An example workflow to run `grunt default` task to build, test, then commit and push any changes back to the GitHub origin repository:
```yaml
name: Grunt build and commit updated stylesheetson: [push]
jobs:
grunt-build:runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12- name: Compile with Grunt
uses: elstudio/actions-js-build/build@v4
with:
wdPath: './web/themes/nw8'- name: Commit changes
uses: elstudio/actions-js-build/commit@v4
with:
commitMessage: Regenerate css
```### Inputs
* `wdPath` - **Optional**. To specify a directory other than the repository root where NPM's Package.json and either gulpfile.js or Gruntfile.js may be found.