Skip to content

Commit

Permalink
chore: 减小 github action 打包体积
Browse files Browse the repository at this point in the history
  • Loading branch information
HowieHz committed Nov 23, 2024
1 parent a7e7990 commit 02ec5a6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .github/exclude-list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.husky/
.vscode/
i18n-settings
node_modules/
screenshots/
src/
tmp/
.editorconfig
.eslintrc.cjs
.gitignore
.hintrc
.prettierignore
index.html
package.json
pnpm-lock.yaml
postcss.config.js
prettier.config.js
README.md
screenshot.png
tailwind.config.js
tsconfig.json
vite.config.ts
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Zip
- name: Remove Theme Build Target
run: rm -rf ~/builds/target
- name: Zip Theme in Chinese
run: |
mkdir -p ~/builds/target
zip -r howiehz-higan-cn.zip . -x .eslintrc.cjs .hintrc .prettierignore index.html package.json pnpm-lock.yaml postcss.config.js prettier.config.js .husky/\* src/\* i18n-settings/\* screenshots/\* .git/\* .github/\* node_modules/\* .gitignore .editorconfig .eslintignore .eslintrc.js .prettierrc.js .stylelintrc.js .vscode/\* .nuxt/\* .nuxtignore .env .env.development .env.production .env.test .env.local .env.development.local .env.production.local .env.test.local
zip -r howiehz-higan-cn.zip . -x@exclude-list.txt
mv howiehz-higan-cn.zip ~/builds/target
zip -r howiehz-higan-en.zip . -x .eslintrc.cjs .hintrc .prettierignore index.html package.json pnpm-lock.yaml postcss.config.js prettier.config.js .husky/\* src/\* i18n-settings/\* screenshots/\* .git/\* .github/\* node_modules/\* .gitignore .editorconfig .eslintignore .eslintrc.js .prettierrc.js .stylelintrc.js .vscode/\* .nuxt/\* .nuxtignore .env .env.development .env.production .env.test .env.local .env.development.local .env.production.local .env.test.local settings.yaml
mv howiehz-higan-en.zip ~/builds/target
- name: Zip Theme in English
run: |
rm settings.yaml
zip -r howiehz-higan-en.zip . [email protected]
mv howiehz-higan-en.zip ~/builds/target
mv i18n-settings/settings.en.yaml settings.yaml
zip -r ~/builds/target/howiehz-higan-en.zip settings.yaml
- name: Upload Theme Build Target
Expand Down

0 comments on commit 02ec5a6

Please sign in to comment.