From 9e3d224ab1469fa0f6ac1ea91d3f2d43081ff17d Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Thu, 28 Nov 2024 13:29:08 +0100 Subject: [PATCH] ci: upload files directly to S3 --- .forgejo/workflows/deploy.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 0473493..844a107 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -16,18 +16,22 @@ jobs: - uses: https://code.icb4dc0.de/prskr/setup-hugo@main with: dart-sass: true - with-deploy: true + extended: true - uses: actions/cache@v4 with: path: /home/runner/.cache/hugo_cache key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-hugomod- - - name: Build & deploy + - name: Build run: | hugo mod get hugo --minify --environment production - hugo deploy + + - name: Copy files to the s3 website content bucket + run: aws s3 sync public s3://${{ secrets.HCLOUD_BUCKET }} --delete env: AWS_ACCESS_KEY_ID: ${{ secrets.HCLOUD_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.HCLOUD_SECRET_KEY }} + AWS_DEFAULT_REGION: fsn1 + AWS_ENDPOINT_URL: ${{ secrets.HCLOUD_ENDPOINT }}