-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32715b4
commit d3ac50a
Showing
1 changed file
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,14 +23,20 @@ jobs: | |
run: cd react/ && npm install | ||
- name: Build for production | ||
run: cd react/ && npx webpack --env mode=production | ||
- name: Commit bundles | ||
- name: Commit bundles if necessary | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add ./react/bundles | ||
LAST_COMMIT=$(git log --format="%B" -n 1) | ||
git commit -m "Build webpack bundles: $LAST_COMMIT" | ||
git push | ||
if [ -z $(git status --porcelain) ]; | ||
then | ||
echo "Working directory clean. Nothing to commit." | ||
else | ||
echo "Working directory changed. Committing bundles." | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git add ./react/bundles | ||
LAST_COMMIT=$(git log --format="%B" -n 1) | ||
git commit -m "Build webpack bundles: $LAST_COMMIT" | ||
git push | ||
fi | ||
test-prod: | ||
needs: [lint-prod, build-webpack-prod] | ||
runs-on: ubuntu-latest | ||
|