Skip to content

Commit

Permalink
chore: fix download artifact issue; fix netlify build issue [test ski…
Browse files Browse the repository at this point in the history
…p][deploy docs][publish]
  • Loading branch information
lejunyang committed Nov 4, 2024
1 parent 1217945 commit 0091cba
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
13 changes: 11 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,19 @@ runs:
if: ${{ inputs.init-test == true || inputs.init-test == 'true' }}
run: pnpm exec playwright install

# - name: Check if needs to download build
# uses: actions/download-artifact@v4
# if: ${{ inputs.run-id }}
# with:
# name: package-builds
# path: ./packages
# run-id: ${{ inputs.run-id }}

# official download-artifact doesn't support download artifact from another workflow run, don't why, use below instead
- name: Check if needs to download build
uses: actions/download-artifact@v4
uses: dawidd6/action-download-artifact@v6
if: ${{ inputs.run-id }}
with:
name: package-builds
path: ./packages
run-id: ${{ inputs.run-id }}
run_id: ${{ inputs.run-id }}
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"build:prod": "cross-env NODE_ENV=production vite build",
"build:iife": "cross-env NODE_ENV=development BUILD_FORMAT=iife vite build",
"build": "rimraf ./dist && pnpm build:dev && pnpm build:prod && pnpm build:iife && node ./processTypeFiles.js",
"build:noType": "cross-env NO_TYPE_EMIT=true pnpm build",
"build:noType": "cross-env NO_TYPE_EMIT=true rimraf ./dist && pnpm build:dev && pnpm build:prod && pnpm build:iife",
"preview": "vite preview",
"v": "npm version"
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<l-radio value="3" high-contrast>3</l-radio>
</l-radio-group>
<l-button class="start-button" variant="solid" style="transform: translateX(-10px)">
<a href="/lun/components/button/">Get Started</a>
<a :href="site.base + 'components/button/'">Get Started</a>
</l-button>
<l-button class="start-button" variant="soft"><a href="https://github.com/lejunyang/lun">View</a></l-button>
</div>
Expand Down Expand Up @@ -149,7 +149,7 @@ const pickColorUpdate = (e: CustomEvent) => {
theme.color = e.detail;
};
const { isDark, lang, page } = useData();
const { isDark, lang, page, site } = useData();
let lastClickX = 0,
lastClickY = 0;
Expand Down
6 changes: 4 additions & 2 deletions src/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,15 @@ const getThemeConfig = (lang: keyof typeof locales = 'zh-CN') => {
} as DefaultTheme.Config;
};

const isNetlify = process.env.NETLIFY === 'true';

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: '/lun/',
base: isNetlify ? undefined : '/lun/',
title: 'Lun',
description: 'Web components',
sitemap: {
hostname: 'https://github.com/lejunyang/lun/',
hostname: isNetlify ? 'https://lun-web.netlify.app' : 'https://github.com/lejunyang/lun/',
},
vue: {
template: {
Expand Down

0 comments on commit 0091cba

Please sign in to comment.