Skip to content

Commit 5cf7089

Browse files
committed
attempt to fix issue where changes to build are not reflected on server
1 parent b202c6f commit 5cf7089

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/build-and-deploy.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ jobs:
3939
with:
4040
name: app-build
4141
path: ./.output
42+
- name: Spin down Docker containers
43+
uses: appleboy/ssh-action@v1
44+
with:
45+
host: ${{ secrets.SSH_HOST }}
46+
username: ${{ secrets.SSH_USERNAME }}
47+
key: ${{ secrets.SSH_KEY }}
48+
port: ${{ secrets.SSH_PORT }}
49+
passphrase: ${{ secrets.SSH_PASSPHRASE }}
50+
script: |
51+
cd ~/sourcedepth.com
52+
docker compose down
4253
- name: Deploy to VPS
4354
uses: appleboy/scp-action@v1
4455
with:
@@ -50,7 +61,6 @@ jobs:
5061
source: "./.output,./src,./public,./mdx,./nginx,./package.json,./package-lock.json,./vite.config.ts,./tsconfig.json,./docker-compose.yml,./Dockerfile"
5162
target: "~/sourcedepth.com/"
5263
overwrite: true
53-
rm: true
5464
- name: Build and restart Docker containers
5565
uses: appleboy/ssh-action@v1
5666
with:
@@ -61,7 +71,6 @@ jobs:
6171
passphrase: ${{ secrets.SSH_PASSPHRASE }}
6272
script: |
6373
cd ~/sourcedepth.com
64-
docker compose down
6574
docker compose build --pull --no-cache
6675
docker compose up -d
6776
docker system prune -f

vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import tsConfigPaths from "vite-tsconfig-paths";
33
import { tanstackStart } from "@tanstack/react-start/plugin/vite"
44
import mdx from "@mdx-js/rollup";
55
import rehypePrettyCode from "rehype-pretty-code";
6+
import { ssr } from "vite-plugin-ssr/plugin";
67

78
export default defineConfig({
89
plugins: [

0 commit comments

Comments
 (0)