Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Test

on:
pull_request:
branches:
- master
push:
branches-ignore:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is kinda old... but i just aligned with other workflow file. we probably could enable dependabot to upgrade those actions in the future.

with:
submodules: true # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.145.0'
# extended: true

- name: Build
run: hugo --minify

- name: Verify build output
run: |
if [ ! -d "public" ]; then
echo "Error: public directory not created"
exit 1
fi
if [ ! -f "public/index.html" ]; then
echo "Error: index.html not found in public directory"
exit 1
fi
echo "Build successful!"
Comment on lines +30 to +40
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if hugo could not build the documentation successfully, this detects the failure. and then CI failure tells the developer needs to address the failure via workflow.