File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and upload website
2
+ on : [push]
3
+ jobs :
4
+ build :
5
+ runs-on : ubuntu-latest
6
+ steps :
7
+ - name : Checkout repository
8
+ uses : actions/checkout@v3
9
+ - name : Setup dependencies
10
+ run : |
11
+ sudo apt-get update
12
+ sudo apt-get install -y hugo
13
+
14
+ - name : Build website
15
+ run : |
16
+ hugo --minify
17
+
18
+ - name : Create SSH key
19
+ run : |
20
+ mkdir -p ~/.ssh/
21
+ echo "$SSH_PRIVATE_KEY" > ../private.key
22
+ sudo chmod 600 ../private.key
23
+ echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
24
+ shell : bash
25
+ env :
26
+ SSH_PRIVATE_KEY : ${{secrets.SSH_PRIVATE_KEY}}
27
+ SSH_KNOWN_HOSTS : ${{secrets.SSH_KNOWN_HOSTS}}
28
+ SSH_KEY_PATH : ${{ github.workspace }}/../private.key
29
+
30
+ - name : Upload website
31
+ run : |
32
+ rsync -ave "ssh -p 8058" public/* zenith@bwsecondary.ddns.net:/etc/nginx/html/html/html_capy
You can’t perform that action at this time.
0 commit comments