From d2fa4f8ee38d822048cfe94362abda7061efd8f4 Mon Sep 17 00:00:00 2001 From: darnodo Date: Wed, 19 Nov 2025 17:59:19 +0100 Subject: [PATCH] Fix deploy workflow to use self-hosted runner --- .gitea/workflows/deploy.yml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 47d8eeb..6eb976c 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -12,22 +12,36 @@ jobs: name: Deploy Hugo Website runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: recursive + container: + image: debian:bookworm-slim - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2.6.0 - with: - hugo-version: "0.108.0" + steps: + - name: Install dependencies + run: | + apt-get update + apt-get install -y git curl ca-certificates + + - name: Checkout code + run: | + git clone --recurse-submodules https://gitea.arnodo.fr/Damien/Notebook.git /workspace + cd /workspace + git checkout ${{ github.sha }} + working-directory: / + + - name: Install Hugo + run: | + curl -L https://github.com/gohugoio/hugo/releases/download/v0.108.0/hugo_0.108.0_linux-amd64.tar.gz -o hugo.tar.gz + tar -xzf hugo.tar.gz + mv hugo /usr/local/bin/ + hugo version - name: Build site run: hugo + working-directory: /workspace - name: Deploy to S3 run: hugo deploy --force --maxDeletes -1 + working-directory: /workspace env: AWS_ACCESS_KEY_ID: ${{ secrets.SCW_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.SCW_SECRET_KEY }} -- 2.52.0