# 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 -s askkennyb # Step 4: (NEW) Set up Node.js - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 18 # Use a stable LTS version # Step 5: (NEW) Install Surfer CLI via npm - name: Install Surfer CLI run: npm install -g surfer-cli # Step 6: (MODIFIED) Deploy using the Surfer CLI - name: Deploy to Cloudron Surfer run: | echo "Deploying to ${{ secrets.SURFER_APP_DOMAIN }}..." # We no longer use './surfer' because it's globally installed surfer put \ --token ${{ secrets.SURFER_TOKEN }} \ --server ${{ secrets.SURFER_APP_DOMAIN }} \ ./askkennyb/public/* /