chore: add cd workflow for publishing theme to halo app store (#239)

Add cd workflow for publishing theme to halo app store


```release-note
None
```
This commit is contained in:
Ryan Wang
2025-03-17 12:47:16 +08:00
committed by GitHub
parent 04ae86464d
commit 11b5d817bd
3 changed files with 25 additions and 17 deletions

19
.github/workflows/cd.yaml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: CD
on:
release:
types:
- published
jobs:
cd:
uses: halo-sigs/reusable-workflows/.github/workflows/theme-cd.yaml@v3
secrets:
halo-pat: ${{ secrets.HALO_PAT }}
permissions:
contents: write
with:
app-id: app-KgWqR
needs-build: true
pnpm-version: 10
node-version: 20

View File

@@ -1,14 +0,0 @@
build: clean
echo "Building theme"
pnpm install
pnpm build
echo "Theme built successfully!"
echo "Collect theme dist"
mkdir dist
cp -r templates dist
cp -r i18n dist
cp theme.yaml settings.yaml README.md dist
clean:
echo "Clean dist folder"
rm -rf dist

View File

@@ -5,11 +5,13 @@
"description": "Default theme for Halo 2.0",
"scripts": {
"dev": "vite build --watch",
"build": "tsc && vite build",
"build-only": "tsc && vite build",
"build": "pnpm run build-only && pnpm package",
"lint": "eslint ./src --ext .js,.cjs,.mjs,.ts,.cts,.mts --ignore-path .gitignore",
"prettier": "prettier --write \"./src/**/*.{js,ts,css,json,ml,yaml,html}\" \"./templates/**/*.html\"",
"release": "release-it",
"prepare": "husky"
"prepare": "husky",
"package": "npx @halo-dev/theme-package-cli"
},
"keywords": [
"halo",
@@ -71,5 +73,6 @@
"alpinejs": "^3.14.3",
"pupa": "^3.1.0",
"tocbot": "^4.32.2"
}
},
"packageManager": "pnpm@10.6.3+sha512.bb45e34d50a9a76e858a95837301bfb6bd6d35aea2c5d52094fa497a467c43f5c440103ce2511e9e0a2f89c3d6071baac3358fc68ac6fb75e2ceb3d2736065e6"
}