From 045d1194d917629e24a5cad9dcc90f339c5026f8 Mon Sep 17 00:00:00 2001 From: Kenny Bondelie Date: Thu, 6 Nov 2025 16:32:42 -0800 Subject: [PATCH] Add Gitea Action for Cloudron deployment --- .gitea/workflows/deploy.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 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..ca0795f --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,47 @@ +# File: .gitea/workflows/deploy.yml +name: Build and Deploy Hugo Site to Cloudron + +# This action runs on every 'push' to the 'main' branch +on: + push: + branches: + - main + +jobs: + build-and-deploy: + # 'ubuntu-latest' is a standard label. + runs-on: ubuntu-latest + + steps: + # Step 1: Check out your repository's code + - name: Check out code + uses: actions/checkout@v4 + with: + # Still critical for fetching your theme + submodules: true + + # Step 2: Set up the Hugo environment + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + + # Step 3: Build your site + - name: Build Hugo Site + run: hugo minify + + # Step 4: Download the standalone Surfer CLI + - name: Download Surfer CLI + run: | + curl -L "https://cloudron.io/surfer-cli/linux/x64/surfer" -o surfer + chmod +x surfer + + # Step 5: Deploy using the Surfer CLI + # This is the simple, direct method you found. + - name: Deploy to Cloudron Surfer + run: | + echo "Deploying to ${{ secrets.SURFER_APP_DOMAIN }}..." + ./surfer put \ + --token ${{ secrets.SURFER_TOKEN }} \ + --server ${{ secrets.SURFER_APP_DOMAIN }} \ + ./public/* / \ No newline at end of file