Skip to content

Commit 2e263c3

Browse files
authored
Merge pull request #119 from fujitatomoya/enable-github-workflow
add .github/workflows/build-test.yml for development.
2 parents a4e1b4a + dfb1b3d commit 2e263c3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/build-test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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!"

0 commit comments

Comments
 (0)