File tree 1 file changed +12
-18
lines changed
1 file changed +12
-18
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ name: Website
2
2
3
3
on :
4
4
workflow_dispatch :
5
- push :
6
- # paths :
7
- # - "website/**"
5
+ push : # only runs on commits to main branch (typically after a merge)
6
+ branches :
7
+ - main
8
8
9
9
jobs :
10
10
build :
@@ -13,28 +13,22 @@ jobs:
13
13
steps :
14
14
- name : 🛒 Checkout
15
15
uses : actions/checkout@v2
16
-
17
16
- name : ✨ Setup Hugo
18
17
env :
19
- HUGO_VERSION : 0.92.2
18
+ HUGO_VERSION : 0.100.1
20
19
run : |
21
20
mkdir ~/hugo
22
21
cd ~/hugo
23
22
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz
24
23
tar -xvzf hugo.tar.gz
25
24
sudo mv hugo /usr/local/bin
26
-
27
25
- name : 🛠️ Build
28
26
run : hugo --source website --destination output --cleanDestinationDir --baseURL https://swharden.com/csdv/ --debug --minify
29
-
30
- - name : 🔑 Install SSH Key
31
- run : |
32
- install -m 600 -D /dev/null ~/.ssh/id_rsa
33
- echo "${{ secrets.REMOTE_SSH_KEY }}" > ~/.ssh/id_rsa
34
- echo "${{ secrets.KNOWN_HOSTS }}" > ~/.ssh/known_hosts
35
-
36
- - name : 🚀 Deploy
37
- run : rsync --archive --delete --stats -e 'ssh -p 18765' 'website/output/' ${{ secrets.REMOTE_DEST }}
38
-
39
- # - name: 🧹 Purge Website Cache
40
- # run: curl --user deploy:${{ secrets.CACHE_PASSWORD }} https://scottplot.net/admin/clear-cache.php
27
+ - name : 🔐 Create Key File
28
+ run : install -m 600 -D /dev/null ~/.ssh/id_rsa
29
+ - name : 🔑 Populate Key
30
+ run : echo "${{ secrets.PRIVATE_KEY }}" > ~/.ssh/id_rsa
31
+ - name : 🚀 Upload
32
+ run :
rsync --archive --stats -e 'ssh -p 18765 -o StrictHostKeyChecking=no' 'website/output/' [email protected] :~/www/swharden.com/public_html/csdv/
33
+ - name : 🧹 Clear Cache
34
+ run :
ssh [email protected] -p 18765 "site-tools-client domain update id=1 flush_cache=1"
You can’t perform that action at this time.
0 commit comments