File tree 5 files changed +53
-1
lines changed
5 files changed +53
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and deploy to DreamHost via sshpass
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ deploy :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v4
14
+
15
+ - name : Install pnpm
16
+ uses : pnpm/action-setup@v4
17
+ with :
18
+ run_install : false
19
+
20
+ - name : Install Node.js
21
+ uses : actions/setup-node@v4
22
+ with :
23
+ node-version : 20
24
+ cache : ' pnpm'
25
+
26
+ - name : Install dependencies
27
+ run : pnpm install
28
+
29
+ - name : Install sshpass
30
+ run : sudo apt-get install -y sshpass
31
+
32
+ - name : Add SSH Key to known_hosts
33
+ env :
34
+ KNOWN_HOSTS_ENTRY : ${{ secrets.KNOWN_HOSTS_ENTRY }}
35
+ HOST : ${{ secrets.HOST }}
36
+ run : |
37
+ mkdir -p ~/.ssh
38
+ echo "$KNOWN_HOSTS_ENTRY" >> ~/.ssh/known_hosts
39
+ chmod 644 ~/.ssh/known_hosts
40
+
41
+ - name : Build static site
42
+ run : pnpm build
43
+
44
+ - name : Deploy via rsync and sshpass
45
+ env :
46
+ USERNAME : ${{ secrets.USERNAME }}
47
+ PASSWORD : ${{ secrets.PASSWORD }}
48
+ HOST : ${{ secrets.HOST }}
49
+ DEPLOY_PATH : departuremono.com
50
+ run : |
51
+ sshpass -p "$PASSWORD" rsync -avz --delete ./dist/* $USERNAME@$HOST:$DEPLOY_PATH
Original file line number Diff line number Diff line change 2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="UTF-8 " />
5
- < link rel ="icon " type ="image/x-icon " href ="/assets/ favicon.ico " />
5
+ < link rel ="icon " type ="image/x-icon " href ="/favicon.ico " />
6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
7
7
< title > Departure Mono</ title >
8
8
< meta name ="title " content ="Departure Mono ">
Original file line number Diff line number Diff line change 3
3
"private" : true ,
4
4
"version" : " 1.422.0" ,
5
5
"type" : " module" ,
6
+ "packageManager" : " pnpm@9" ,
6
7
"scripts" : {
7
8
"dev" : " vite" ,
8
9
"build" : " tsc -b && vite build" ,
You can’t perform that action at this time.
0 commit comments