0

Auto-bundle web app on commits

This commit is contained in:
Gabe Kangas 2022-08-15 19:23:42 -07:00
parent 052a669c2c
commit 4cd9e22e34
No known key found for this signature in database
GPG Key ID: 9A56337728BC81EA
2 changed files with 7 additions and 25 deletions

View File

@ -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

View File

@ -1,21 +1,19 @@
name: Bundle web app
name: Bundle and bundle web app into Owncast codebase
on:
repository_dispatch:
types: [bundle-admin-event]
push:
paths:
- web/**
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- name: Bundle admin
- 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:
author_name: Owncast
author_email: owncast@owncast.online
message: 'Update embedded web app to ${{ github.event.client_payload.sha }}'
message: 'Bundle embedded web app'
add: 'static/web'
env:
GITHUB_TOKEN: ${{ secrets.GH_CR_PAT }}