From 4af86ebe4fe00b3f93e7f255c7f1af6576b8ea4a Mon Sep 17 00:00:00 2001 From: John Date: Sat, 8 Mar 2025 21:58:16 -0600 Subject: [PATCH] build script --- .gitea/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ content/_index.md | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..bc23fb2 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build Hugo Site + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Hugo + run: | + sudo apt update + sudo apt install -y hugo + + - name: Build Hugo Site + run: | + # Build directly to the mounted public directory + hugo --minify -d /data/hugo/public + + # Verify the build was successful + if [ ! -d /data/hugo/public ]; then + echo "Hugo build failed - public directory not created" + exit 1 + fi \ No newline at end of file diff --git a/content/_index.md b/content/_index.md index bf76216..591897c 100644 --- a/content/_index.md +++ b/content/_index.md @@ -4,4 +4,4 @@ description: "This is a website" date: 2025-03-08 --- -Hello World \ No newline at end of file +Hello World! \ No newline at end of file