ci: fix build gh-pages workflow

This commit is contained in:
luoxiao 2023-10-11 11:07:57 +08:00
parent 7ad2fa8a9a
commit 91b83c9025
36 changed files with 7 additions and 12 deletions

View file

@ -22,7 +22,7 @@ jobs:
uses: tj-actions/changed-files@v36
with:
files: |
gh-pages
demo
src
Cargo.toml

View file

@ -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

2
.gitignore vendored
View file

@ -10,7 +10,7 @@ Cargo.lock
**/*.rs.bk
/examples/**/dist
/gh-pages/dist
/demo/dist
/docs
.DS_Store

View file

@ -1,5 +0,0 @@
{
"rust-analyzer.linkedProjects": [
"gh-pages/Cargo.toml"
]
}

View file

@ -24,4 +24,4 @@ icondata = { version = "0.0.7", features = [
] }
[workspace]
members = ["gh-pages"]
members = ["demo"]

View file

@ -1,5 +1,5 @@
[package]
name = "gh-pages"
name = "demo"
version = "0.1.0"
edition = "2021"

View file

@ -1,7 +1,6 @@
[build]
target = "index.html"
public_url = "/melt-ui/"
dist = "../docs"
# release = true
[watch]

1
demo/gh-pages Submodule

@ -0,0 +1 @@
Subproject commit 5f44d23c39fef044c21783a9944070aed5305952

View file

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B