File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Test
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master
7+ push :
8+ branches-ignore :
9+ - master
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-22.04
15+ steps :
16+ - uses : actions/checkout@v2
17+ with :
18+ submodules : true # Fetch Hugo themes
19+ fetch-depth : 0 # Fetch all history for .GitInfo and .Lastmod
20+
21+ - name : Setup Hugo
22+ uses : peaceiris/actions-hugo@v2
23+ with :
24+ hugo-version : ' 0.145.0'
25+ # extended: true
26+
27+ - name : Build
28+ run : hugo --minify
29+
30+ - name : Verify build output
31+ run : |
32+ if [ ! -d "public" ]; then
33+ echo "Error: public directory not created"
34+ exit 1
35+ fi
36+ if [ ! -f "public/index.html" ]; then
37+ echo "Error: index.html not found in public directory"
38+ exit 1
39+ fi
40+ echo "Build successful!"
You can’t perform that action at this time.
0 commit comments