Giter Site home page Giter Site logo

actions-js-build's Introduction

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:

name: Grunt build and commit updated stylesheets

on: [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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.