From bc8820c085035218700dca10a904b304c72cc8c0 Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Wed, 5 Nov 2025 19:58:02 +0100 Subject: [PATCH 1/9] Add workflow --- .gitea/workflows/deploy.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..915bdf5 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,17 @@ +name: Building & Deploying Website +on: [push] + +jobs: + Deploy-Website: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: Build website + run: | + hugo + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file From e1e011bd15c42573bb0e80f7d1edf80f8d6f749d Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Wed, 5 Nov 2025 20:18:10 +0100 Subject: [PATCH 2/9] Install hugo action --- .gitea/workflows/deploy.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 915bdf5..684303d 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -5,13 +5,14 @@ jobs: Deploy-Website: runs-on: ubuntu-latest steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - name: Check out repository code uses: actions/checkout@v4 - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - name: Build website - run: | - hugo - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.152.2' + # extended: true + + - name: Build + run: hugo --minify \ No newline at end of file From 4ba6ffad2183cf5eabf8ac73b2110bd8c59118d1 Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Wed, 5 Nov 2025 20:19:39 +0100 Subject: [PATCH 3/9] Checkout submodules --- .gitea/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 684303d..f939f6f 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -7,6 +7,8 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 + with: + submodules: true - name: Setup Hugo uses: peaceiris/actions-hugo@v3 From 2669bb2297b65401170d3cf3dcf5f5550530d2c7 Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Wed, 5 Nov 2025 20:23:09 +0100 Subject: [PATCH 4/9] Add publish step --- .gitea/workflows/deploy.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index f939f6f..d492587 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -17,4 +17,9 @@ jobs: # extended: true - name: Build - run: hugo --minify \ No newline at end of file + run: hugo --minify + + - name: Publish + run: | + rm -rf /mnt/website/* + cp public/* /mnt/website From 74ebd07231f0b04ff1a97877729678e0089d5bca Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Wed, 5 Nov 2025 20:25:17 +0100 Subject: [PATCH 5/9] Modify publish --- .gitea/workflows/deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d492587..1dbdd70 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -21,5 +21,4 @@ jobs: - name: Publish run: | - rm -rf /mnt/website/* cp public/* /mnt/website From 9af235e21e16ea729468a63bead1db9bbe0d6f9b Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Wed, 5 Nov 2025 20:30:24 +0100 Subject: [PATCH 6/9] Modify publish command --- .gitea/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 1dbdd70..47b5d9c 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -21,4 +21,5 @@ jobs: - name: Publish run: | - cp public/* /mnt/website + mkdir /data/website + cp public/* /data/website From d9efc2078c8b78b6bb93a5c69c2e74dcb0d7a596 Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Wed, 5 Nov 2025 21:41:42 +0100 Subject: [PATCH 7/9] Switch deploy to meli --- .gitea/workflows/deploy.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 47b5d9c..c2de073 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,5 +1,7 @@ name: Building & Deploying Website on: [push] +env: + MELI_SITE: "musikverein-molbergen" jobs: Deploy-Website: @@ -19,7 +21,13 @@ jobs: - name: Build run: hugo --minify - - name: Publish + - name: "publish" run: | - mkdir /data/website - cp public/* /data/website + npx -p "@getmeli/cli" meli upload ./public \ + --url "https://pages.hogertz.eu" \ + --site "$MELI_SITE" \ + --token "$MELI_TOKEN" \ + --release "$GITHUB_SHA" + env: + MELI_TOKEN: ${{ secrets.MELI_TOKEN }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} From d067ea051788a4ab3794d403c4e70484eddb710f Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Wed, 5 Nov 2025 21:43:45 +0100 Subject: [PATCH 8/9] Fix Meli site --- .gitea/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c2de073..02c0599 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,7 +1,7 @@ name: Building & Deploying Website on: [push] env: - MELI_SITE: "musikverein-molbergen" + MELI_SITE: "4a03bf6e-193f-4626-bbeb-a1407422d0bc" jobs: Deploy-Website: From ccaf58808f8c2fd20fead6707e3c60c0b13d7fa6 Mon Sep 17 00:00:00 2001 From: Hendrik Hogertz Date: Wed, 5 Nov 2025 21:48:33 +0100 Subject: [PATCH 9/9] Fix typo --- .gitea/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 02c0599..e554218 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -21,7 +21,7 @@ jobs: - name: Build run: hugo --minify - - name: "publish" + - name: "Publish" run: | npx -p "@getmeli/cli" meli upload ./public \ --url "https://pages.hogertz.eu" \