File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Web Deployment
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-24.04
11
+ env :
12
+ BASE_URL : https://keila.io
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+ - uses : actions/cache@v2
16
+ with :
17
+ path : |
18
+ ~/.npm
19
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
20
+ - run : |
21
+ # Install Node
22
+ sudo apt update && sudo apt install nodejs
23
+
24
+ # Install packages and build
25
+ npm ci
26
+ npm run build
27
+
28
+ # Add SSH key
29
+ mkdir ~/.ssh
30
+ echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
31
+ echo "${{ secrets.KNOWN_HOSTS }}" > ~/.ssh/known_hosts
32
+ chmod 600 ~/.ssh/*
33
+
34
+ # Deploy
35
+ DEPLOY_TARGET=${{ secrets.DEPLOY_TARGET }} npm run deploy
Original file line number Diff line number Diff line change 8
8
"build" : " astro build" ,
9
9
"preview" : " astro preview" ,
10
10
"astro" : " astro" ,
11
- "format" : " prettier --write ."
11
+ "format" : " prettier --write ." ,
12
+ "deploy" : " rsync -avz ./dist/ $DEPLOY_TARGET"
12
13
},
13
14
"dependencies" : {
14
15
"@astrojs/alpinejs" : " ^0.4.0" ,
You can’t perform that action at this time.
0 commit comments