From 4cd9e22e348db275a13478289fd194ed5fd7c5a3 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Mon, 15 Aug 2022 19:23:42 -0700 Subject: [PATCH] Auto-bundle web app on commits --- .github/workflows/build-next.yml | 16 ---------------- .github/workflows/bundle-web.yml | 16 +++++++--------- 2 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/build-next.yml diff --git a/.github/workflows/build-next.yml b/.github/workflows/build-next.yml deleted file mode 100644 index 6e8488b97..000000000 --- a/.github/workflows/build-next.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/bundle-web.yml b/.github/workflows/bundle-web.yml index 6a19ba017..300bf954b 100644 --- a/.github/workflows/bundle-web.yml +++ b/.github/workflows/bundle-web.yml @@ -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 }}