https://pvzm.net/ to play [Read-only GitHub mirror] pvzm.net
modded vs pvz plants-vs-zombies plantsvszombies javascript online zombie noads jspvz pvzm game plants plant
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

merge jobs

authored by

Clay and committed by
GitHub
a962d788 f2fe3964

+41 -63
+41 -63
.github/workflows/main.yml
··· 15 15 cancel-in-progress: false 16 16 17 17 jobs: 18 - version-file-and-lint: 18 + build-and-deploy: 19 19 runs-on: ubuntu-latest 20 20 21 21 steps: ··· 28 28 node-version: "lts/*" 29 29 30 30 - name: Install dependencies 31 - run: npm i -g oxlint oxfmt 31 + run: npm i -g oxlint oxfmt esbuild html-minifier-terser 32 32 33 33 - name: Beautify code 34 34 run: | ··· 58 58 Co-authored-by: ${{ github.actor }} <${{ steps.get_commit_message.outputs.author_email }}>" || exit 0 59 59 git push 60 60 61 - deploy: 62 - runs-on: ubuntu-latest 63 - needs: version-file-and-lint 64 - steps: 65 - - name: Checkout latest from main 66 - uses: actions/checkout@v4 67 - with: 68 - ref: main 69 - fetch-depth: 0 70 - 71 - - name: Pull latest changes 72 - run: git pull origin main 73 - 74 - - name: Setup Node.js 75 - uses: actions/setup-node@v3 76 - with: 77 - node-version: "lts/*" 78 - 79 - - name: Install minification tools 80 - run: | 81 - npm install -g esbuild html-minifier-terser 82 - 83 - - name: Bundle CPlants.js 84 - run: | 85 - esbuild game/js/CPlants.js \ 86 - --bundle \ 87 - --minify \ 88 - --sourcemap \ 89 - --sources-content=true \ 90 - --outfile=game/js/CPlants.js \ 91 - --allow-overwrite 92 - 93 - - name: Minify JavaScript & CSS files 94 - run: | 95 - esbuild $(find . -type f \( -name "*.js" -o -name "*.css" \) -not -path "./node_modules/*") \ 96 - --minify \ 97 - --sourcemap \ 98 - --sources-content=true \ 99 - --outdir=. \ 100 - --allow-overwrite 101 - 102 - - name: Minify HTML files 103 - run: | 104 - find . -type f -name "*.html" -not -path "./node_modules/*" | while read file; do 105 - html-minifier-terser \ 106 - --collapse-whitespace \ 107 - --remove-comments \ 108 - --remove-tag-whitespace \ 109 - --minify-css true \ 110 - --minify-js true \ 111 - -o "$file" \ 112 - "$file" 113 - done 61 + - name: Bundle CPlants.js 62 + run: | 63 + esbuild game/js/CPlants.js \ 64 + --bundle \ 65 + --minify \ 66 + --sourcemap \ 67 + --sources-content=true \ 68 + --outfile=game/js/CPlants.js \ 69 + --allow-overwrite 114 70 115 - - name: Deploy to Cloudflare Pages (Direct Upload) 116 - uses: cloudflare/wrangler-action@v3 117 - with: 118 - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} 119 - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} 120 - command: pages deploy . --project-name=pvz 121 - gitHubToken: ${{ secrets.GITHUB_TOKEN }} 71 + - name: Minify JavaScript & CSS files 72 + run: | 73 + esbuild $(find . -type f \( -name "*.js" -o -name "*.css" \) -not -path "./node_modules/*") \ 74 + --minify \ 75 + --sourcemap \ 76 + --sources-content=true \ 77 + --outdir=. \ 78 + --allow-overwrite 79 + 80 + - name: Minify HTML files 81 + run: | 82 + find . -type f -name "*.html" -not -path "./node_modules/*" | while read file; do 83 + html-minifier-terser \ 84 + --collapse-whitespace \ 85 + --remove-comments \ 86 + --remove-tag-whitespace \ 87 + --minify-css true \ 88 + --minify-js true \ 89 + -o "$file" \ 90 + "$file" 91 + done 92 + 93 + - name: Deploy to Cloudflare Pages (Direct Upload) 94 + uses: cloudflare/wrangler-action@v3 95 + with: 96 + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} 97 + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} 98 + command: pages deploy . --project-name=pvz 99 + gitHubToken: ${{ secrets.GITHUB_TOKEN }} 122 100 123 101 # discord-notify: 124 102 # runs-on: ubuntu-latest 125 - # needs: [version-file-and-lint, deploy] 103 + # needs: build-and-deploy 126 104 # if: always() 127 105 # steps: 128 106 # - name: Notify Discord