-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (38 loc) · 1.43 KB
/
build.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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
# Workaround: https://github.com/redhat-developer/vscode-yaml/issues/397
name: Minify and Build main repository
on: push
jobs:
build:
name: Dispatch to `sound-buttons`
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: json-syntax-check
uses: limitusus/json-syntax-check@v1
with:
pattern: "\\.json$"
- uses: zofrex/mirror-branch@v1
if: ${{ success() }}
with:
target-branch: minify
# Use https://github.com/Josee9988/MinifyAllCli
- name: Minify Action
run: "npx @josee9988/minifyall -d ."
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: minify
commit_message: "GitHub Action: Auto Minified HTML CSS JSON JSONC"
commit_user_name: Minify Action Bot # defaults to "GitHub Actions"
commit_author: Minify Action Bot <actions@github.com> # defaults to author of the commit that triggered the run
- name: Emit repository_dispatch
if: ${{ success() }}
uses: mvasigh/dispatch-action@main
with:
# You should create a personal access token and store it in your repository
token: ${{ secrets.ACCESS_TOKEN }}
repo: sound-buttons
event_type: update_config