From 78118ef486a984a1b07236019ebb12adfdf24dd1 Mon Sep 17 00:00:00 2001 From: chiefmikey Date: Sun, 21 Aug 2022 00:24:07 -0600 Subject: [PATCH 1/2] Add client build --- .../{webpack.yml => client-build.yml} | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) rename .github/workflows/{webpack.yml => client-build.yml} (70%) diff --git a/.github/workflows/webpack.yml b/.github/workflows/client-build.yml similarity index 70% rename from .github/workflows/webpack.yml rename to .github/workflows/client-build.yml index c5d8a90b..cc3c1135 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/client-build.yml @@ -1,27 +1,37 @@ -name: Webpack Build +name: Client Build on: push: - branches: [ main ] + branches: [main] jobs: build: runs-on: ubuntu-latest permissions: contents: write + steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: '0' - - uses: actions/setup-node@v3 + + - name: Setup Node + uses: actions/setup-node@v3 with: node-version: '16.x' - - name: Build + + - name: Webpack run: | npm install NODE_ENV=production NODE_OPTIONS=--loader=ts-node/esm webpack --mode production - git config advice.addIgnoredFile false + + - name: Prune + run : | rm -v !("docs"|"README.md"|"LICENSE") + + - name: Push + run: | git config --global user.email "wolfemikl@gmail.com" git config --global user.name "Mikl Wolfe" git add docs From 3a781b8926f90adbcf387846251b3a75049a2c49 Mon Sep 17 00:00:00 2001 From: chiefmikey Date: Sun, 21 Aug 2022 00:24:12 -0600 Subject: [PATCH 2/2] Add test build --- .github/workflows/test-build.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/test-build.yml diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml new file mode 100644 index 00000000..db58f49c --- /dev/null +++ b/.github/workflows/test-build.yml @@ -0,0 +1,38 @@ +name: Test Build + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: '0' + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: '16.x' + + - name: Webpack + run: | + npm install + NODE_ENV=production NODE_OPTIONS=--loader=ts-node/esm webpack --mode production + + - name: Prune + run : | + rm -v !("docs"|"README.md"|"LICENSE") + + - name: Push + run: | + git config --global user.email "wolfemikl@gmail.com" + git config --global user.name "Mikl Wolfe" + git add docs + git commit -am 'Update production build' + git push -f origin main:test