Skip to content

Commit 337d386

Browse files
committed
adds action for only updating public/mdx/nginx files which will not require a build to update site
1 parent db7af64 commit 337d386

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Update Files 📝
2+
3+
# Updates files on the VPS without rebuilding or redeploying the Docker image.
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- main
10+
# Only run this workflow for changes in public or mdx directories
11+
paths:
12+
- "public/**"
13+
- "mdx/**"
14+
- "nginx/nginx.conf"
15+
release:
16+
types: [published]
17+
18+
jobs:
19+
update-public:
20+
runs-on: ubuntu-latest
21+
name: Update Public Files
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
- name: Copy public and mdx files
26+
uses: appleboy/scp-action@v1
27+
with:
28+
host: ${{ secrets.SSH_HOST }}
29+
username: ${{ secrets.SSH_USERNAME }}
30+
key: ${{ secrets.SSH_KEY }}
31+
port: ${{ secrets.SSH_PORT }}
32+
passphrase: ${{ secrets.SSH_PASSPHRASE }}
33+
source: "./public,./mdx"
34+
target: "~/sourcedepth.com/"
35+
overwrite: true

0 commit comments

Comments
 (0)