From 91b83c90253a26d6a1106a9f2f8aaf3dfaa88b96 Mon Sep 17 00:00:00 2001 From: luoxiao Date: Wed, 11 Oct 2023 11:07:57 +0800 Subject: [PATCH] ci: fix build gh-pages workflow --- .github/workflows/get-melt-changed.yml | 2 +- .github/workflows/gh-pages.yml | 4 ++-- .gitignore | 2 +- .vscode/settings.json | 5 ----- Cargo.toml | 2 +- {gh-pages => demo}/Cargo.toml | 2 +- {gh-pages => demo}/README.md | 0 {gh-pages => demo}/Trunk.toml | 1 - demo/gh-pages | 1 + {gh-pages => demo}/index.html | 0 {gh-pages => demo}/src/app.rs | 0 {gh-pages => demo}/src/assets/css/index.css | 0 {gh-pages => demo}/src/assets/svg/grid_dot.svg | 0 {gh-pages => demo}/src/components/demo.rs | 0 {gh-pages => demo}/src/components/mod.rs | 0 {gh-pages => demo}/src/components/site_header.rs | 0 {gh-pages => demo}/src/main.rs | 0 {gh-pages => demo}/src/pages/button/mod.rs | 0 {gh-pages => demo}/src/pages/checkbox/mod.rs | 0 {gh-pages => demo}/src/pages/color_picker/mod.rs | 0 {gh-pages => demo}/src/pages/components.rs | 0 {gh-pages => demo}/src/pages/home.rs | 0 {gh-pages => demo}/src/pages/image/mod.rs | 0 {gh-pages => demo}/src/pages/input/mod.rs | 0 {gh-pages => demo}/src/pages/menu/mod.rs | 0 {gh-pages => demo}/src/pages/mobile.rs | 0 {gh-pages => demo}/src/pages/mod.rs | 0 {gh-pages => demo}/src/pages/modal/mod.rs | 0 {gh-pages => demo}/src/pages/nav_bar/mod.rs | 0 {gh-pages => demo}/src/pages/select/mod.rs | 0 {gh-pages => demo}/src/pages/slider/mod.rs | 0 {gh-pages => demo}/src/pages/space/mod.rs | 0 {gh-pages => demo}/src/pages/tabbar/mod.rs | 0 {gh-pages => demo}/src/pages/table/mod.rs | 0 {gh-pages => demo}/src/pages/tabs/mod.rs | 0 {gh-pages => demo}/src/pages/toast/mod.rs | 0 36 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 .vscode/settings.json rename {gh-pages => demo}/Cargo.toml (96%) rename {gh-pages => demo}/README.md (100%) rename {gh-pages => demo}/Trunk.toml (91%) create mode 160000 demo/gh-pages rename {gh-pages => demo}/index.html (100%) rename {gh-pages => demo}/src/app.rs (100%) rename {gh-pages => demo}/src/assets/css/index.css (100%) rename {gh-pages => demo}/src/assets/svg/grid_dot.svg (100%) rename {gh-pages => demo}/src/components/demo.rs (100%) rename {gh-pages => demo}/src/components/mod.rs (100%) rename {gh-pages => demo}/src/components/site_header.rs (100%) rename {gh-pages => demo}/src/main.rs (100%) rename {gh-pages => demo}/src/pages/button/mod.rs (100%) rename {gh-pages => demo}/src/pages/checkbox/mod.rs (100%) rename {gh-pages => demo}/src/pages/color_picker/mod.rs (100%) rename {gh-pages => demo}/src/pages/components.rs (100%) rename {gh-pages => demo}/src/pages/home.rs (100%) rename {gh-pages => demo}/src/pages/image/mod.rs (100%) rename {gh-pages => demo}/src/pages/input/mod.rs (100%) rename {gh-pages => demo}/src/pages/menu/mod.rs (100%) rename {gh-pages => demo}/src/pages/mobile.rs (100%) rename {gh-pages => demo}/src/pages/mod.rs (100%) rename {gh-pages => demo}/src/pages/modal/mod.rs (100%) rename {gh-pages => demo}/src/pages/nav_bar/mod.rs (100%) rename {gh-pages => demo}/src/pages/select/mod.rs (100%) rename {gh-pages => demo}/src/pages/slider/mod.rs (100%) rename {gh-pages => demo}/src/pages/space/mod.rs (100%) rename {gh-pages => demo}/src/pages/tabbar/mod.rs (100%) rename {gh-pages => demo}/src/pages/table/mod.rs (100%) rename {gh-pages => demo}/src/pages/tabs/mod.rs (100%) rename {gh-pages => demo}/src/pages/toast/mod.rs (100%) diff --git a/.github/workflows/get-melt-changed.yml b/.github/workflows/get-melt-changed.yml index 6da181c..6172a5d 100644 --- a/.github/workflows/get-melt-changed.yml +++ b/.github/workflows/get-melt-changed.yml @@ -22,7 +22,7 @@ jobs: uses: tj-actions/changed-files@v36 with: files: | - gh-pages + demo src Cargo.toml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 0d5dda7..fa4e494 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -30,7 +30,7 @@ jobs: version: "latest" - name: Deploy GitHub Pages run: | - cd gh-pages + cd demo trunk build --release git worktree add gh-pages git config user.name "Deploy demo from CI" @@ -39,7 +39,7 @@ jobs: # Delete the ref to avoid keeping history. git update-ref -d refs/heads/gh-pages rm -rf * - mv ../docs/* . + mv ../dist/* . git add . git commit -m "Deploy demo $GITHUB_SHA to gh-pages" git push --force --set-upstream origin gh-pages diff --git a/.gitignore b/.gitignore index 0345b10..51a6466 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ Cargo.lock **/*.rs.bk /examples/**/dist -/gh-pages/dist +/demo/dist /docs .DS_Store \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index bbe6121..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rust-analyzer.linkedProjects": [ - "gh-pages/Cargo.toml" - ] -} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index e993f21..92239e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,4 +24,4 @@ icondata = { version = "0.0.7", features = [ ] } [workspace] -members = ["gh-pages"] +members = ["demo"] diff --git a/gh-pages/Cargo.toml b/demo/Cargo.toml similarity index 96% rename from gh-pages/Cargo.toml rename to demo/Cargo.toml index e7164e6..5ab43a1 100644 --- a/gh-pages/Cargo.toml +++ b/demo/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "gh-pages" +name = "demo" version = "0.1.0" edition = "2021" diff --git a/gh-pages/README.md b/demo/README.md similarity index 100% rename from gh-pages/README.md rename to demo/README.md diff --git a/gh-pages/Trunk.toml b/demo/Trunk.toml similarity index 91% rename from gh-pages/Trunk.toml rename to demo/Trunk.toml index bb3d0da..d9e0ddb 100644 --- a/gh-pages/Trunk.toml +++ b/demo/Trunk.toml @@ -1,7 +1,6 @@ [build] target = "index.html" public_url = "/melt-ui/" -dist = "../docs" # release = true [watch] diff --git a/demo/gh-pages b/demo/gh-pages new file mode 160000 index 0000000..5f44d23 --- /dev/null +++ b/demo/gh-pages @@ -0,0 +1 @@ +Subproject commit 5f44d23c39fef044c21783a9944070aed5305952 diff --git a/gh-pages/index.html b/demo/index.html similarity index 100% rename from gh-pages/index.html rename to demo/index.html diff --git a/gh-pages/src/app.rs b/demo/src/app.rs similarity index 100% rename from gh-pages/src/app.rs rename to demo/src/app.rs diff --git a/gh-pages/src/assets/css/index.css b/demo/src/assets/css/index.css similarity index 100% rename from gh-pages/src/assets/css/index.css rename to demo/src/assets/css/index.css diff --git a/gh-pages/src/assets/svg/grid_dot.svg b/demo/src/assets/svg/grid_dot.svg similarity index 100% rename from gh-pages/src/assets/svg/grid_dot.svg rename to demo/src/assets/svg/grid_dot.svg diff --git a/gh-pages/src/components/demo.rs b/demo/src/components/demo.rs similarity index 100% rename from gh-pages/src/components/demo.rs rename to demo/src/components/demo.rs diff --git a/gh-pages/src/components/mod.rs b/demo/src/components/mod.rs similarity index 100% rename from gh-pages/src/components/mod.rs rename to demo/src/components/mod.rs diff --git a/gh-pages/src/components/site_header.rs b/demo/src/components/site_header.rs similarity index 100% rename from gh-pages/src/components/site_header.rs rename to demo/src/components/site_header.rs diff --git a/gh-pages/src/main.rs b/demo/src/main.rs similarity index 100% rename from gh-pages/src/main.rs rename to demo/src/main.rs diff --git a/gh-pages/src/pages/button/mod.rs b/demo/src/pages/button/mod.rs similarity index 100% rename from gh-pages/src/pages/button/mod.rs rename to demo/src/pages/button/mod.rs diff --git a/gh-pages/src/pages/checkbox/mod.rs b/demo/src/pages/checkbox/mod.rs similarity index 100% rename from gh-pages/src/pages/checkbox/mod.rs rename to demo/src/pages/checkbox/mod.rs diff --git a/gh-pages/src/pages/color_picker/mod.rs b/demo/src/pages/color_picker/mod.rs similarity index 100% rename from gh-pages/src/pages/color_picker/mod.rs rename to demo/src/pages/color_picker/mod.rs diff --git a/gh-pages/src/pages/components.rs b/demo/src/pages/components.rs similarity index 100% rename from gh-pages/src/pages/components.rs rename to demo/src/pages/components.rs diff --git a/gh-pages/src/pages/home.rs b/demo/src/pages/home.rs similarity index 100% rename from gh-pages/src/pages/home.rs rename to demo/src/pages/home.rs diff --git a/gh-pages/src/pages/image/mod.rs b/demo/src/pages/image/mod.rs similarity index 100% rename from gh-pages/src/pages/image/mod.rs rename to demo/src/pages/image/mod.rs diff --git a/gh-pages/src/pages/input/mod.rs b/demo/src/pages/input/mod.rs similarity index 100% rename from gh-pages/src/pages/input/mod.rs rename to demo/src/pages/input/mod.rs diff --git a/gh-pages/src/pages/menu/mod.rs b/demo/src/pages/menu/mod.rs similarity index 100% rename from gh-pages/src/pages/menu/mod.rs rename to demo/src/pages/menu/mod.rs diff --git a/gh-pages/src/pages/mobile.rs b/demo/src/pages/mobile.rs similarity index 100% rename from gh-pages/src/pages/mobile.rs rename to demo/src/pages/mobile.rs diff --git a/gh-pages/src/pages/mod.rs b/demo/src/pages/mod.rs similarity index 100% rename from gh-pages/src/pages/mod.rs rename to demo/src/pages/mod.rs diff --git a/gh-pages/src/pages/modal/mod.rs b/demo/src/pages/modal/mod.rs similarity index 100% rename from gh-pages/src/pages/modal/mod.rs rename to demo/src/pages/modal/mod.rs diff --git a/gh-pages/src/pages/nav_bar/mod.rs b/demo/src/pages/nav_bar/mod.rs similarity index 100% rename from gh-pages/src/pages/nav_bar/mod.rs rename to demo/src/pages/nav_bar/mod.rs diff --git a/gh-pages/src/pages/select/mod.rs b/demo/src/pages/select/mod.rs similarity index 100% rename from gh-pages/src/pages/select/mod.rs rename to demo/src/pages/select/mod.rs diff --git a/gh-pages/src/pages/slider/mod.rs b/demo/src/pages/slider/mod.rs similarity index 100% rename from gh-pages/src/pages/slider/mod.rs rename to demo/src/pages/slider/mod.rs diff --git a/gh-pages/src/pages/space/mod.rs b/demo/src/pages/space/mod.rs similarity index 100% rename from gh-pages/src/pages/space/mod.rs rename to demo/src/pages/space/mod.rs diff --git a/gh-pages/src/pages/tabbar/mod.rs b/demo/src/pages/tabbar/mod.rs similarity index 100% rename from gh-pages/src/pages/tabbar/mod.rs rename to demo/src/pages/tabbar/mod.rs diff --git a/gh-pages/src/pages/table/mod.rs b/demo/src/pages/table/mod.rs similarity index 100% rename from gh-pages/src/pages/table/mod.rs rename to demo/src/pages/table/mod.rs diff --git a/gh-pages/src/pages/tabs/mod.rs b/demo/src/pages/tabs/mod.rs similarity index 100% rename from gh-pages/src/pages/tabs/mod.rs rename to demo/src/pages/tabs/mod.rs diff --git a/gh-pages/src/pages/toast/mod.rs b/demo/src/pages/toast/mod.rs similarity index 100% rename from gh-pages/src/pages/toast/mod.rs rename to demo/src/pages/toast/mod.rs