Skip to content

Commit

Permalink
ci: fix design-common.css and x.md file 404
Browse files Browse the repository at this point in the history
  • Loading branch information
kagol committed Dec 6, 2024
1 parent 266590c commit 4075ef7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/auto-deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ jobs:
with:
source: ./examples/sites/dist
destination: ./_site
- run: sudo chmod -R 777 ./dist
- run: cp ./examples/sites/dist/assets/_commonjsHelpers*.js ./_site/assets
- run: cp ./_site/index.html ./_site/404.html
- name: Repair build artifact
run: |
sudo chmod -R 777 ./_site
cp ./examples/sites/dist/assets/_commonjsHelpers*.js ./_site/assets
cp ./_site/index.html ./_site/404.html
sed -i 's/\/static/\/tiny-vue\/static/' ./_site/static/js/design-common.js
sh ./examples/sites/dist/cp-component-md.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

Expand Down
7 changes: 7 additions & 0 deletions examples/sites/cp-component-md.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

for file in ./examples/sites/dist/\@demos/app/*
do
component=${file##*/}
cp ./examples/sites/dist/\@demos/app/${component}/webdoc/*.md ./_site/\@demos/app/${component}/webdoc
done
2 changes: 1 addition & 1 deletion examples/sites/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:saas:alpha": "vite build --mode innersaas",
"build:saas:open": "vite build --mode saasopen",
"build:saas:prod": "vite build --mode saasprod",
"build": "vite build --mode pages",
"build": "vite build --mode pages && cp cp-component-md.sh ./dist",
"build:open": "vite build --mode open",
"prettier": "npx prettier --write ./**/*.{ts,tsx,css,less,scss,vue}",
"stylelint": "npx stylelint ./src/**/*.scss ./src/**/*.less ./src/**/*.css --fix",
Expand Down

0 comments on commit 4075ef7

Please sign in to comment.