mirror of
https://github.com/owntone/owntone-server.git
synced 2025-05-03 08:20:30 -04:00
Merge pull request #1670 from owntone/gh_build_webui
Let Github actions rebuild web UI on push to web-src
This commit is contained in:
commit
9e9dc27a59
39
.github/workflows/build_htdocs.yml
vendored
Normal file
39
.github/workflows/build_htdocs.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: Build htdocs
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- 'web-src/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: web-src
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
# Build for production with minification (will update web interface
|
||||||
|
# in "../htdocs")
|
||||||
|
- name: Build htdocs
|
||||||
|
working-directory: web-src
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Count changed files
|
||||||
|
id: count
|
||||||
|
run: |
|
||||||
|
git add htdocs/
|
||||||
|
git diff --numstat --staged > diffstat
|
||||||
|
test -s diffstat || { echo "Warning: Push to web-src did not change htdocs"; exit 1; }
|
||||||
|
|
||||||
|
# The GH action email is from https://github.com/orgs/community/discussions/26560
|
||||||
|
- name: Commit and push updated assets
|
||||||
|
run: |
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git commit -m "[web] Rebuild web interface"
|
||||||
|
git push
|
15
.github/workflows/codeql-analysis.yml
vendored
15
.github/workflows/codeql-analysis.yml
vendored
@ -2,10 +2,19 @@ name: "CodeQL"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master, ]
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'htdocs/**'
|
||||||
|
- 'web-src/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
branches:
|
||||||
branches: [master]
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'htdocs/**'
|
||||||
|
- 'web-src/**'
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 19 * * 6'
|
- cron: '0 19 * * 6'
|
||||||
|
|
||||||
|
14
.github/workflows/macos.yml
vendored
14
.github/workflows/macos.yml
vendored
@ -2,9 +2,19 @@ name: MacOS
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'htdocs/**'
|
||||||
|
- 'web-src/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'htdocs/**'
|
||||||
|
- 'web-src/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
14
.github/workflows/ubuntu.yml
vendored
14
.github/workflows/ubuntu.yml
vendored
@ -2,9 +2,19 @@ name: Ubuntu
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'htdocs/**'
|
||||||
|
- 'web-src/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'htdocs/**'
|
||||||
|
- 'web-src/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user