Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let Github actions rebuild web UI on push to web-src #1670

Merged
merged 2 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/build_htdocs.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 12 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ name: "CodeQL"

on:
push:
branches: [master, ]
branches:
- master
paths-ignore:
- 'docs/**'
- 'htdocs/**'
- 'web-src/**'
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
branches:
- master
paths-ignore:
- 'docs/**'
- 'htdocs/**'
- 'web-src/**'
schedule:
- cron: '0 19 * * 6'

Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@ name: MacOS

on:
push:
branches: [ master ]
branches:
- master
paths-ignore:
- 'docs/**'
- 'htdocs/**'
- 'web-src/**'
pull_request:
branches: [ master ]
branches:
- master
paths-ignore:
- 'docs/**'
- 'htdocs/**'
- 'web-src/**'
workflow_dispatch:

jobs:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@ name: Ubuntu

on:
push:
branches: [ master ]
branches:
- master
paths-ignore:
- 'docs/**'
- 'htdocs/**'
- 'web-src/**'
pull_request:
branches: [ master ]
branches:
- master
paths-ignore:
- 'docs/**'
- 'htdocs/**'
- 'web-src/**'
workflow_dispatch:

jobs:
Expand Down
Loading