owncast/.github/workflows/bundle-web.yml

45 lines
1.2 KiB
YAML
Raw Normal View History

2022-08-16 05:47:31 +03:00
name: Build and bundle web app into Owncast
on:
2022-08-16 05:23:42 +03:00
push:
branches:
- develop
2022-08-16 05:23:42 +03:00
paths:
- 'web/**'
- '!**.md'
2022-08-16 05:23:42 +03:00
jobs:
bundle:
runs-on: ubuntu-latest
if: github.repository == 'owncast/owncast'
steps:
2022-11-24 02:06:51 +03:00
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content_newer'
2023-02-16 01:46:45 +03:00
- name: Cache node modules
uses: actions/cache@v3
2023-02-16 01:46:45 +03: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-16 05:23:42 +03:00
- name: Bundle web app (next.js build)
uses: actions/checkout@v3
- run: build/web/bundleWeb.sh
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
2022-08-16 06:41:10 +03:00
pull: --rebase --autostash
2022-08-16 05:23:42 +03:00
message: 'Bundle embedded web app'
add: 'static/web'
author_name: Owncast
author_email: owncast@owncast.online