25
25
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26
26
- name : Checkout repository
27
27
uses : actions/checkout@v4
28
- - name : Checkout submodules
29
- run : git submodule update --init --recursive --remote
30
-
31
- - name : Setup Hugo
32
- uses : peaceiris/actions-hugo@v3
33
- with :
34
- hugo-version : ' latest'
35
- extended : true
36
28
37
29
- name : Get twikoo version
38
30
id : twikoo
@@ -49,60 +41,18 @@ jobs:
49
41
value : ${{ steps.twikoo.outputs.twikoo_version }}
50
42
commitChange : true
51
43
52
- - name : Compress Image
53
- run : |
54
- wget 'https://github.com/kornelski/cavif-rs/releases/download/v1.5.4/cavif-1.5.4.zip'
55
- unzip cavif-1.5.4.zip
56
- sudo mv ./linux-generic/cavif /bin
57
- # find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec cavif {} \;
58
-
59
- - name : Build
60
- run : hugo --gc --minify --cleanDestinationDir
61
-
62
- - name : Deploy
63
- uses : peaceiris/actions-gh-pages@v4
64
- with :
65
- github_token : ${{ secrets.TOKEN }}
66
- publish_branch : master
67
- force_orphan : true
68
- publish_dir : ./public
69
- cname : liudon.com
44
+ # - name: Compress Image
45
+ # run: |
46
+ # wget 'https://github.com/kornelski/cavif-rs/releases/download/v1.5.4/cavif-1.5.4.zip'
47
+ # unzip cavif-1.5.4.zip
48
+ # sudo mv ./linux-generic/cavif /bin
49
+ # # find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec cavif {} \;
70
50
71
- - name : Generate robots.txt
72
- run : |
73
- echo "User-agent: *" > ./public/robots.txt
74
- echo "Disallow: /" >> ./public/robots.txt
75
-
76
- - name : Connect to ssh in BG
77
- timeout-minutes : 2
78
- run : |
79
- echo "${{ secrets.SSHKEY }}" > ../privkey
80
- chmod 600 ../privkey
81
- ssh -o StrictHostKeyChecking=no ${{ secrets.SSHHOST }} -i ../privkey -L 5001:localhost:5001 -fTN
51
+ - name : Build and Publish Github Pages
52
+ uses : ./.github/workflows/gh-pages.yml
82
53
83
- - name : IPFS upload
84
- uses : filebase/ipfs-action@master
85
- id : deploy
86
- timeout-minutes : 2
87
- with :
88
- path : ./public
89
- service : ipfs
90
- verbose : true
91
- host : localhost
92
- port : 5001
93
- protocol : http
94
- key : ipfs-action
95
-
96
- - name : IPFS upload to filebase
97
- uses : filebase/ipfs-action@master
98
- with :
99
- path : ./public
100
- service : filebase
101
- pinName : ipfs-action
102
- filebaseBucket : ${{ secrets.FILEBASE_BUCKET }}
103
- filebaseKey : ${{ secrets.FILEBASE_KEY }}
104
- filebaseSecret : ${{ secrets.FILEBASE_SECRET }}
105
- key : ipfs-action
54
+ - name : Build and Publish IPFS
55
+ uses : ./.github/workflows/ipfs.yml
106
56
107
57
- name : Easyindex
108
58
run : |
0 commit comments