From e028df17af7168aefde63d49f45998be67246f75 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:56:00 -0500 Subject: [PATCH] FEAT: Working minify workflow using github actions. --- .github/workflows/minify.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/minify.yml diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml deleted file mode 100644 index c54981c..0000000 --- a/.github/workflows/minify.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Prepare for deployment. - -on: - push: - branches: - - 'main' - -jobs: - minify: - 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 html-minifier - - - run: git checkout -b build - - - name: Minify files. - run: | - for i in `find . -name "*.js" -type f`; do terser $i --compress -o $i; done - for i in `find . -name "*.css" -type f`; do csso $i -o $i; done - for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done - - - run: git commit -am "STUFF" - - run: git push -f --set-upstream origin build