Fixed undersized drill mill operations with plunge strategy, automati… #108
This file contains hidden or 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: Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| # 1. Build: Run custom build script (creates dist, inlines CSS, bundles JS) | |
| - name: Build Production Assets | |
| run: node .github/scripts/build.js --src . --dist ./dist | |
| # 2. Minify: Compress bundled assets | |
| - name: Minify Assets | |
| run: | | |
| npm install terser html-minifier-terser --no-save | |
| # Minify JS bundle | |
| npx terser dist/easytrace5000/app.bundle.js \ | |
| --compress --mangle \ | |
| --comments '/^!/' \ | |
| -o dist/easytrace5000/app.bundle.js | |
| # Minify theme-loader.js | |
| npx terser dist/themes/theme-loader.js \ | |
| --compress --mangle \ | |
| --comments '/^!/' \ | |
| -o dist/themes/theme-loader.js | |
| # Minify all HTML files recursively | |
| find dist -name "*.html" -type f | while read html; do | |
| echo "Minifying $html..." | |
| npx html-minifier-terser "$html" \ | |
| --collapse-whitespace \ | |
| --remove-comments \ | |
| --ignore-custom-comments "^!" \ | |
| --minify-css true \ | |
| --minify-js true \ | |
| -o "$html" | |
| done | |
| # 3. Deploy: Upload dist folder via FTP | |
| - name: FTP Deploy | |
| uses: SamKirkland/FTP-Deploy-Action@v4.3.4 | |
| with: | |
| server: ${{ secrets.FTP_SERVER }} | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| local-dir: ./dist/ | |
| server-dir: / | |
| exclude: | | |
| **/.git* | |
| **/.DS_Store | |
| **/.build-manifest.json |