1
1
name : Deploy website to GitHub Pages
2
2
3
3
env :
4
- WC_HUGO_VERSION : ' 0.122.0 '
4
+ WC_HUGO_VERSION : ' 0.123.4 '
5
5
6
6
on :
7
7
# Trigger the workflow every time you push to the `main` branch
@@ -26,37 +26,37 @@ jobs:
26
26
if : github.repository_owner != 'HugoBlox'
27
27
runs-on : ubuntu-latest
28
28
steps :
29
- - name : Checkout
30
- uses : actions/checkout@v4
31
- with :
29
+ - name : Checkout
30
+ uses : actions/checkout@v4
31
+ with :
32
32
# Fetch history for Hugo's .GitInfo and .Lastmod
33
- fetch-depth : 0
34
- - name : Setup Hugo
35
- uses : peaceiris/actions-hugo@v2
36
- with :
37
- hugo-version : ${{ env.WC_HUGO_VERSION }}
38
- extended : true
39
- - uses : actions/cache@v3
40
- with :
41
- path : /tmp/hugo_cache_runner/
42
- key : ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }}
43
- restore-keys : |
44
- ${{ runner.os }}-hugomod-
45
- - name : Setup Pages
46
- id : pages
47
- uses : actions/configure-pages@v3
48
- - name : Build with Hugo
49
- env :
50
- HUGO_ENVIRONMENT : production
51
- run : |
52
- echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
53
- hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
54
- - name : Generate Pagefind search index
55
- run : npx pagefind --source "public"
56
- - name : Upload artifact
57
- uses : actions/upload-pages-artifact@v2
58
- with :
59
- path : ./public
33
+ fetch-depth : 0
34
+ - name : Setup Hugo
35
+ uses : peaceiris/actions-hugo@v2
36
+ with :
37
+ hugo-version : ${{ env.WC_HUGO_VERSION }}
38
+ extended : true
39
+ - uses : actions/cache@v3
40
+ with :
41
+ path : /tmp/hugo_cache_runner/
42
+ key : ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }}
43
+ restore-keys : |
44
+ ${{ runner.os }}-hugomod-
45
+ - name : Setup Pages
46
+ id : pages
47
+ uses : actions/configure-pages@v3
48
+ - name : Build with Hugo
49
+ env :
50
+ HUGO_ENVIRONMENT : production
51
+ run : |
52
+ echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
53
+ hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
54
+ - name : Generate Pagefind search index
55
+ run : npx pagefind --source "public"
56
+ - name : Upload artifact
57
+ uses : actions/upload-pages-artifact@v2
58
+ with :
59
+ path : ./public
60
60
61
61
# Deploy website to GitHub Pages hosting
62
62
deploy :
67
67
runs-on : ubuntu-latest
68
68
needs : build
69
69
steps :
70
- - name : Deploy to GitHub Pages
71
- id : deployment
72
- uses : actions/deploy-pages@v2
70
+ - name : Deploy to GitHub Pages
71
+ id : deployment
72
+ uses : actions/deploy-pages@v2
0 commit comments