2525 push :
2626 branches :
2727 - main # Set a branch to deploy
28+
2829 schedule :
2930 - cron : " 0 3 * * *"
3031
32+ workflow_dispatch :
33+
34+ permissions :
35+ contents : read
36+ pages : write
37+ id-token : write
38+
39+ defaults :
40+ run :
41+ shell : bash
42+
3143env :
3244 # ----------------------------------------------------------------------------
3345 # Specify the deployment environment: staging or production
34- hugoEnvironment : production
46+ hugoEnvironment : staging
47+ HUGO_VERSION : 0.133.1
3548
3649jobs :
3750 # ----------------------------------------------------------------------------
4255 outputs :
4356 zoteroVersion : ${{ fromJson(steps.zoteroVersion.outputs.headers).last-modified-version }}
4457 cacheHit : ${{ steps.cache-zotero-bib.outputs.cache-hit }}
58+
4559 runs-on : ubuntu-latest
4660 concurrency :
4761 group : ${{ github.workflow }}-${{ github.ref }}
7488 runs-on : ubuntu-latest
7589 if : github.event_name == 'push' || needs.check.outputs.cacheHit != 'true'
7690 steps :
77- - uses : actions/checkout@v4
91+ - uses : actions/checkout@v4A
92+ with :
93+ submodules : recursive
94+ fetch-depth : 0
7895
7996 - name : Cache Zotero Bibliography
8097 id : cache-zotero-bib
@@ -102,13 +119,24 @@ jobs:
102119 ./update_bibliography.sh
103120 sudo cp --recursive ${GITHUB_WORKSPACE}/static/data ~/data
104121 fi
105- shell : bash
106122
107- - name : Setup Hugo
108- uses : peaceiris/actions-hugo@v3
109- with :
110- hugo-version : ' 0.133.1'
111- extended : true
123+ - name : Install Dart Sass
124+ run : sudo snap install dart-sass
125+
126+ - name : Install Hugo CLI
127+ run : |
128+ wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
129+ && sudo dpkg -i ${{ runner.temp }}/hugo.deb
130+
131+ # - name: Setup Hugo
132+ # uses: peaceiris/actions-hugo@v3
133+ # with:
134+ # hugo-version: ${{ HUGO_VERSION }}
135+ # extended: true
136+
137+ - name : Setup Pages
138+ id : pages
139+ uses : actions/configure-pages@v5
112140
113141 - name : Setup Node
114142 uses : actions/setup-node@v4
@@ -120,7 +148,16 @@ jobs:
120148 - run : npm install --verbose
121149
122150 - name : Build
123- run : hugo -e staging
151+ env :
152+ HUGOENVIRONMENT : staging
153+ HUGO_CACHEDIR : ${{ runner.temp }}/hugo_cache
154+ TZ : America/New York
155+ run : hugo --gc
156+
157+ # - name: Upload artifact
158+ # uses: actions/upload-pages-artifact@v3
159+ # with:
160+ # path: ./public
124161
125162 - name : Deploy
126163 uses : peaceiris/actions-gh-pages@v4
0 commit comments