From e67b8a3e4cc3fe422332f63f47598925511ff538 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Thu, 14 Nov 2019 09:47:20 +0000 Subject: [PATCH] Commit and push built files to master (#756) * Commit and push built files to master * Testing... * Add name * Add fallback * Revert back to master branch --- .github/workflows/build-and-test.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 0791084..3b89840 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -15,8 +15,8 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 10 - # run all tests - - run: | + - name: Build and run all tests + run: | npm ci npm run build npx bundlesize @@ -32,6 +32,15 @@ jobs: BUNDLESIZE_GITHUB_TOKEN: ${{secrets.BUNDLESIZE_GITHUB_TOKEN}} FORCE_COLOR: 2 HUSKY_SKIP_INSTALL: true + - name: Commit built files + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -m "Update build files 🏗" -a || echo "No changes to commit" && exit 0 + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Upload coverage to Codecov run: bash <(curl -s https://codecov.io/bash)