Merge pull request #20 from mvhutz/mvhutz-patch-1 #24
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: Prepare changes for deployment. | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.SECRET }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install dependencies. | |
run: npm i -g terser csso-cli | |
- name: "Copying changes over to build." | |
run: git checkout -b build | |
- name: Minify files. | |
run: | | |
find . -name "*.js" -type f -exec terser {} -c -o {} \; | |
find . -name "*.css" -type f -exec csso {} -o {} \; | |
- name: "Commiting changes." | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git commit -am "Preparing changes for deployment." | |
- name: "Pushing changes." | |
run: git push -uf origin build |