-
Notifications
You must be signed in to change notification settings - Fork 6
67 lines (55 loc) · 2.19 KB
/
build.js.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build VF assets
on:
push:
branches: [ master ]
# pull_request:
# branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: yarn install && yarn run build
- name: Build
run: yarn run build
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
# https://github.com/stefanzweifel/git-auto-commit-action
# Required
commit_message: Apply automatic changes
# Optional branch to push to, defaults to the current branch
# branch: feature-123
# Optional options appended to `git-commit`
commit_options: '--no-verify --signoff'
# Optional glob pattern of files which should be added to the commit
# file_pattern: ./wp-content/themes/vf-wp/assets/**/*.* tests/*.js
file_pattern: ./wp-content/themes/vf-wp/assets/**/*.* ./wp-content/themes/vf-wp/assets/assets/**/*.* ./vf-components/**/*.*
# Optional local file path to the repository
# repository: .
# Optional commit user and author settings
commit_user_name: VF-WP GitHub Actions Bot
commit_user_email: [email protected]
commit_author: VF-WP GitHub Actions Bot <[email protected]>
# Optional tag message
# Action will create and push a new tag to the remote repository and the defined branch
# tagging_message: 'v1.0.0'
# Optional options appended to `git-push`
# push_options: '--force'
# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
# - run: npm ci
# - run: npm run build --if-present
# - run: npm test