Auto-bundle web app on commits
This commit is contained in:
16
.github/workflows/build-next.yml
vendored
16
.github/workflows/build-next.yml
vendored
@@ -1,16 +0,0 @@
|
|||||||
name: Build web app
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- web/**
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
name: npm run build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: cd web && npm install --include=dev --force && npm run build
|
|
||||||
16
.github/workflows/bundle-web.yml
vendored
16
.github/workflows/bundle-web.yml
vendored
@@ -1,21 +1,19 @@
|
|||||||
name: Bundle web app
|
name: Bundle and bundle web app into Owncast codebase
|
||||||
on:
|
on:
|
||||||
repository_dispatch:
|
push:
|
||||||
types: [bundle-admin-event]
|
paths:
|
||||||
|
- web/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bundle:
|
bundle:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Bundle admin
|
- name: Bundle web app (next.js build)
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- run: build/web/bundleWeb.sh
|
- run: build/web/bundleWeb.sh
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@v9
|
||||||
with:
|
with:
|
||||||
author_name: Owncast
|
message: 'Bundle embedded web app'
|
||||||
author_email: owncast@owncast.online
|
|
||||||
message: 'Update embedded web app to ${{ github.event.client_payload.sha }}'
|
|
||||||
add: 'static/web'
|
add: 'static/web'
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_CR_PAT }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user