Add action for automatic lint/building of static resources

This will run the yarn build every time a file is modified in the /src folder. It will hopefully reduce the steps needed for developing.
This commit is contained in:
camjac251 2020-07-28 18:12:40 -05:00 committed by GitHub
parent 34d3601c30
commit 3646721fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

38
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: build
on:
push:
branches:
- safe.fiery.me
paths:
- 'src/js/*.js'
- 'src/css/*.scss'
- 'src/libs/fontello/*.css'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install
- name: yarn build
run: yarn build
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: gulp build assets
commit_user_name: Gulp
env:
CI: true