chore(deps): bump #22
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
name: Build Production | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'latest' | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.DISPATCH_WORKFLOW }} | |
- name: Webpack | |
run: | | |
npm install | |
NODE_ENV=production webpack --mode production | |
- name: Prune Files | |
run : | | |
prune() { | |
echo "Remove: ${1}" | |
if | |
[ "${1}" != "." ] && | |
[ "${1}" != ".." ] && | |
[ "${1}" != "./.git" ] && | |
[ "${1}" != "./docs" ] && | |
[ "${1}" != "./LICENSE" ] && | |
[ "${1}" != "./README.md" ]; then | |
rm -rf ${1} | |
fi | |
} | |
export -f prune | |
find . -maxdepth 1 | while read file; do prune ${file}; done | |
- name: Push Client | |
run: | | |
git config user.name "chiefmikey" | |
git config user.email "wolfemikl@gmail.com" | |
git add . | |
git commit -am 'Update production build' | |
git push -fu origin HEAD:client |