Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/deploy-obs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Deploy to Huawei OBS

on:
push:
branches: [dev]
paths:
- 'examples/sites/**'
- '!examples/sites/**/*.spec.ts'

workflow_dispatch:

env:
# 在 GitHub 项目源码仓库 → 项目的 Settings → Secrets(Actions 里的 Repository secrets) 里提前建好以下变量
HUAWEI_CLOUD_AK: ${{ secrets.HUAWEI_CLOUD_AK }}
HUAWEI_CLOUD_SK: ${{ secrets.HUAWEI_CLOUD_SK }}
HUAWEI_CLOUD_ENDPOINT: ${{ secrets.HUAWEI_CLOUD_ENDPOINT }}
HUAWEI_CLOUD_BUCKET: ${{ secrets.HUAWEI_CLOUD_BUCKET }}

permissions:
contents: read
pages: write
id-token: write

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9
- name: Install deps
run: pnpm i --no-frozen-lockfile
- name: Get version
run: |
echo "VERSION=$(node -p "require('./examples/sites/package.json').version")" >> $GITHUB_ENV
- name: Build site
run: |
export NODE_OPTIONS="--max-old-space-size=8192"
pnpm build:site
env:
VITE_APP_BUILD_BASE_URL: //opentiny-assets.obs.cn-north-4.myhuaweicloud.com/tiny-vue-web-doc/${{ env.VERSION }}/
- name: Copy files
run: |
ls
ls examples/sites
ls examples/sites/dist
cp ./examples/sites/dist/index.html ./examples/sites/dist/404.html
# ===== 下载 obsutil =====
- name: Install obsutil
run: |
curl -o obsutil.tar.gz https://obs-community.obs.cn-north-1.myhuaweicloud.com/obsutil/current/obsutil_linux_amd64.tar.gz
tar -xzf obsutil.tar.gz
chmod +x obsutil_linux_amd64_*/obsutil
sudo mv obsutil_linux_amd64_*/obsutil /usr/local/bin/obsutil

# ===== 配置并上传 =====
- name: Upload to OBS
run: |
# 一次性配置 AK/SK/endpoint
obsutil config -i=${{ env.HUAWEI_CLOUD_AK }} \
-k=${{ env.HUAWEI_CLOUD_SK }} \
-e=${{ env.HUAWEI_CLOUD_ENDPOINT }}

# 把本地 dist/ 目录整站同步到桶根目录
mv examples/sites/dist ${{ env.VERSION }}
obsutil cp ${{ env.VERSION }} obs://${{ env.HUAWEI_CLOUD_BUCKET }}/tiny-vue-web-doc/ -r -f
8 changes: 4 additions & 4 deletions packages/vue/src/filter/src/tag-group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
:class="['h-9 mt-3 float-left relative']"
:style="{ width: state.tagWidth }"
>
<IconSubScript
<IconSubscript
v-if="state.selected.indexOf(item.value) !== -1 && multiple"
class="absolute right-3 w-4 h-4 fill-color-icon-focus"
></IconSubScript>
></IconSubscript>
<span
:class="[
'h-full block p-2 text-center rounded-sm truncate cursor-pointer border-0.5 mr-3',
Expand All @@ -53,11 +53,11 @@
<script lang="ts">
import { renderless, api } from '@opentiny/vue-renderless/filter/tag-group'
import { setup, $props, defineComponent } from '@opentiny/vue-common'
import { IconSubScript } from '@opentiny/vue-icon'
import { iconSubscript } from '@opentiny/vue-icon'

export default defineComponent({
emits: ['click', 'update:modelValue'],
components: { IconSubScript: IconSubScript() },
components: { IconSubscript: iconSubscript() },
model: {
prop: 'modelValue',
event: 'update:modelValue'
Expand Down
Loading