Skip to content

Commit

Permalink
Revert "Refactor build and deployment workflow for web and API integr…
Browse files Browse the repository at this point in the history
…ation"

This reverts commit 550329c.
  • Loading branch information
swuecho committed Aug 30, 2024
1 parent c705070 commit 5d1bbe8
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
npm install
npm run build
working-directory: web
- name: copy to api/static
run: |
cp -R web/dist/* api/static/
- name: Set up Go
uses: actions/setup-go@v3
with:
Expand Down
3 changes: 1 addition & 2 deletions api/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
tmp/
chat_backend
env.sh
static/static
static/index.html
static/static
81 changes: 81 additions & 0 deletions api/static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/svg+xml" href="/favicon.ico">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<title>Chat</title>
<script defer src="/static/js/lib-lodash.e977ffe1.js"></script><script defer src="/static/js/lib-axios.d803160c.js"></script><script defer src="/static/js/lib-vue.3af99978.js"></script><script defer src="/static/js/lib-router.bf93913b.js"></script><script defer src="/static/js/5.ab43b00d.js"></script><script defer src="/static/js/index.0ac2bd82.js"></script><link href="/static/css/5.2a21c7a8.css" rel="stylesheet"><link href="/static/css/index.b940249a.css" rel="stylesheet"></head>

<body class="dark:bg-black">
<div id="app">
<style>
.loading-wrap {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

.balls {
width: 4em;
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: space-between;
}

.balls div {
width: 0.8em;
height: 0.8em;
border-radius: 50%;
background-color: #4b9e5f;
}

.balls div:nth-of-type(1) {
transform: translateX(-100%);
animation: left-swing 0.5s ease-in alternate infinite;
}

.balls div:nth-of-type(3) {
transform: translateX(-95%);
animation: right-swing 0.5s ease-out alternate infinite;
}

@keyframes left-swing {

50%,
100% {
transform: translateX(95%);
}
}

@keyframes right-swing {
50% {
transform: translateX(-95%);
}

100% {
transform: translateX(100%);
}
}

@media (prefers-color-scheme: dark) {
body {
background: #121212;
}
}
</style>
<div class="loading-wrap">
<div class="balls">
<div></div>
<div></div>
<div></div>
</div>
</div>
</div>
</body>

</html>
5 changes: 0 additions & 5 deletions web/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ export default defineConfig({
index: './src/main.ts',
},
},
output: {
distPath: {
root: '../api/static/',
}
},
plugins: [
pluginVue(),
pluginLess(),
Expand Down

0 comments on commit 5d1bbe8

Please sign in to comment.