File tree Expand file tree Collapse file tree 2 files changed +61
-1
lines changed
Expand file tree Collapse file tree 2 files changed +61
-1
lines changed Original file line number Diff line number Diff line change 5454 env :
5555 HUGO_CACHEDIR : ${{ runner.temp }}/hugo_cache
5656 HUGO_ENVIRONMENT : production
57- TZ : America/Los_Angeles
57+ TZ : Europe/Berlin
5858 run : |
5959 hugo \
6060 --gc \
Original file line number Diff line number Diff line change 1+ # Test to build the hugo site
2+ name : Test Hugo Build
3+
4+ on :
5+ # Runs on merges targeting the default branch
6+ pull_request: :
7+ branches :
8+ - main
9+
10+ # Allows you to run this workflow manually from the Actions tab
11+ workflow_dispatch :
12+
13+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
14+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
15+ concurrency :
16+ group : " pages"
17+ cancel-in-progress : false
18+
19+ # Default to bash
20+ defaults :
21+ run :
22+ shell : bash
23+
24+ jobs :
25+ # Build job
26+ build :
27+ runs-on : ubuntu-latest
28+ env :
29+ HUGO_VERSION : 0.141.0
30+ steps :
31+ - name : Install Hugo CLI
32+ run : |
33+ wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
34+ && sudo dpkg -i ${{ runner.temp }}/hugo.deb
35+ - name : Install Dart Sass
36+ run : sudo snap install dart-sass
37+ - name : Checkout
38+ uses : actions/checkout@v4
39+ with :
40+ submodules : recursive
41+ fetch-depth : 0
42+ - name : Setup Pages
43+ id : pages
44+ uses : actions/configure-pages@v5
45+ - name : Install Node.js dependencies
46+ run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
47+ - name : Build with Hugo
48+ env :
49+ HUGO_CACHEDIR : ${{ runner.temp }}/hugo_cache
50+ HUGO_ENVIRONMENT : production
51+ TZ : Europe/Berlin
52+ run : |
53+ hugo \
54+ --gc \
55+ --minify \
56+ --baseURL "${{ steps.pages.outputs.base_url }}/"
57+ - name : Create custom 404 page
58+ run : cp public/en/404.html public/404.html
59+ - name : Initialize search index
60+ run : npx -y pagefind --site public
You can’t perform that action at this time.
0 commit comments