From e36c26507a2a9d58627f54b2fc1f4dea0a1bf4c0 Mon Sep 17 00:00:00 2001 From: Damien Arnodo Date: Wed, 19 Nov 2025 11:50:14 +0000 Subject: [PATCH] Add Gitea Actions workflow for Scaleway deployment --- .gitea/workflows/deploy.yml | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 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..93bf665 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,50 @@ +name: Deploy to Scaleway + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + extended: true + + - name: Build Hugo site + run: hugo --minify + + - name: Install s3cmd + run: | + sudo apt-get update + sudo apt-get install -y s3cmd + + - name: Configure s3cmd for Scaleway + run: | + cat > ~/.s3cfg << EOF + [default] + access_key = ${{ secrets.SCW_ACCESS_KEY }} + secret_key = ${{ secrets.SCW_SECRET_KEY }} + host_base = s3.fr-par.scw.cloud + host_bucket = %(bucket)s.s3.fr-par.scw.cloud + use_https = True + EOF + + - name: Deploy to Scaleway Object Storage + run: | + s3cmd sync --delete-removed --acl-public public/ s3://${{ secrets.SCW_BUCKET_NAME }}/ + + - name: Invalidate cache (optional) + run: | + echo "If using Scaleway CDN, add cache invalidation here"