Skip to content

Commit cc41d97

Browse files
committed
ci: fix design-common.css and x.md file 404
1 parent 266590c commit cc41d97

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/auto-deploy-site.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,16 @@ jobs:
4343
with:
4444
source: ./examples/sites/dist
4545
destination: ./_site
46-
- run: sudo chmod -R 777 ./dist
46+
- run: sudo chmod -R 777 ./_site
4747
- run: cp ./examples/sites/dist/assets/_commonjsHelpers*.js ./_site/assets
4848
- run: cp ./_site/index.html ./_site/404.html
49+
- run: sed -i 's/\/static/\/tiny-vue\/static/' ./_site/static/js/design-common.js
50+
- run: ls ./_site/\@demos/app/button/webdoc
51+
- run: ls ./_site/\@demos/app/dialog-select/webdoc
52+
- run: cp ./examples/sites/dist/\@demos/app/button/webdoc/*.md ./_site/\@demos/app/button/webdoc
53+
- run: sh ./examples/sites/dist/co-component-md.sh
54+
- run: ls ./_site/\@demos/app/button/webdoc
55+
- run: ls ./_site/\@demos/app/alert/webdoc
4956
- name: Upload artifact
5057
uses: actions/upload-pages-artifact@v3
5158

examples/sites/cp-component-md.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
for file in ./examples/sites/dist/\@demos/app/*
4+
do
5+
component=${file##*/}
6+
cp ./examples/sites/dist/\@demos/app/${component}/webdoc/*.md ./_site/\@demos/app/${component}/webdoc
7+
done

examples/sites/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"build:saas:alpha": "vite build --mode innersaas",
1515
"build:saas:open": "vite build --mode saasopen",
1616
"build:saas:prod": "vite build --mode saasprod",
17-
"build": "vite build --mode pages",
17+
"build": "vite build --mode pages && cp cp-component-md.sh ./dist",
1818
"build:open": "vite build --mode open",
1919
"prettier": "npx prettier --write ./**/*.{ts,tsx,css,less,scss,vue}",
2020
"stylelint": "npx stylelint ./src/**/*.scss ./src/**/*.less ./src/**/*.css --fix",

0 commit comments

Comments
 (0)