2022-08-15 19:47:31 -07:00
|
|
|
name: Build and bundle web app into Owncast
|
2022-06-19 15:30:32 -07:00
|
|
|
on:
|
2022-08-15 19:23:42 -07:00
|
|
|
push:
|
2022-08-19 22:13:01 -07:00
|
|
|
branches:
|
|
|
|
- develop
|
2022-08-15 19:23:42 -07:00
|
|
|
paths:
|
2022-12-26 20:30:16 +01:00
|
|
|
- 'web/**'
|
2023-01-27 16:18:02 -08:00
|
|
|
- '!**.md'
|
2022-08-15 19:23:42 -07:00
|
|
|
|
2022-06-19 15:30:32 -07:00
|
|
|
jobs:
|
|
|
|
bundle:
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-19 11:56:15 -08:00
|
|
|
if: github.repository == 'owncast/owncast'
|
2022-11-04 20:04:13 -07:00
|
|
|
|
2022-06-19 15:30:32 -07:00
|
|
|
steps:
|
2022-11-23 15:06:51 -08:00
|
|
|
- id: skip_check
|
|
|
|
uses: fkirc/skip-duplicate-actions@v5
|
|
|
|
with:
|
|
|
|
concurrent_skipping: 'same_content_newer'
|
|
|
|
|
2023-02-15 14:46:45 -08:00
|
|
|
- name: Cache node modules
|
2023-03-14 19:13:59 -07:00
|
|
|
uses: actions/cache@v3
|
2023-02-15 14:46:45 -08:00
|
|
|
env:
|
|
|
|
cache-name: cache-node-modules-bundle-web-app
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('web/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
|
|
${{ runner.os }}-build-
|
|
|
|
${{ runner.os }}-
|
|
|
|
|
2022-08-15 19:23:42 -07:00
|
|
|
- name: Bundle web app (next.js build)
|
2022-06-19 15:30:32 -07:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
- run: build/web/bundleWeb.sh
|
|
|
|
|
|
|
|
- name: Commit changes
|
|
|
|
uses: EndBug/add-and-commit@v9
|
|
|
|
with:
|
2022-08-15 20:41:10 -07:00
|
|
|
pull: --rebase --autostash
|
2022-08-15 19:23:42 -07:00
|
|
|
message: 'Bundle embedded web app'
|
2022-06-19 15:30:32 -07:00
|
|
|
add: 'static/web'
|
2023-02-14 10:08:01 -08:00
|
|
|
author_name: Owncast
|
|
|
|
author_email: owncast@owncast.online
|