From 4ca219f42860c154df93d35c9ac1a9b290435017 Mon Sep 17 00:00:00 2001 From: changsongd Date: Tue, 27 May 2025 19:27:59 +0800 Subject: [PATCH] add workflow --- .gitea/workflows/build.yml | 29 +++++++++++++++++++++++++++++ .gitmodules | 3 --- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .gitea/workflows/build.yml delete mode 100644 .gitmodules diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..08f0746 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,29 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + env: + HUGO_VERSION: '0.147.5' + 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!" + - name: Install Hugo CLI + run: | + wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + run: | + echo "git clone ${{ gitea.server_url }}/${{ gitea.repository }} ." + git clone ${{ gitea.server_url }}/${{ gitea.repository }} . + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: Build with Hugo + run: hugo + - name: Deploy + run: | + rm -rf /workspace/html/blog + cp -r public/* /workspace/html/blog/ + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 89af1b0..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "themes/PaperMod"] - path = themes/PaperMod - url = https://github.com/adityatelange/hugo-PaperMod.git