ci: upload files directly to S3
All checks were successful
Deploy pages / deploy (push) Successful in 34s

This commit is contained in:
Peter 2024-11-28 13:29:08 +01:00
parent 0154e1beec
commit 9e3d224ab1
Signed by: prskr
GPG key ID: F56BED6903BC5E37

View file

@ -16,18 +16,22 @@ jobs:
- uses: https://code.icb4dc0.de/prskr/setup-hugo@main - uses: https://code.icb4dc0.de/prskr/setup-hugo@main
with: with:
dart-sass: true dart-sass: true
with-deploy: true extended: true
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: /home/runner/.cache/hugo_cache path: /home/runner/.cache/hugo_cache
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: | restore-keys: |
${{ runner.os }}-hugomod- ${{ runner.os }}-hugomod-
- name: Build & deploy - name: Build
run: | run: |
hugo mod get hugo mod get
hugo --minify --environment production 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: env:
AWS_ACCESS_KEY_ID: ${{ secrets.HCLOUD_KEY_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.HCLOUD_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.HCLOUD_SECRET_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.HCLOUD_SECRET_KEY }}
AWS_DEFAULT_REGION: fsn1
AWS_ENDPOINT_URL: ${{ secrets.HCLOUD_ENDPOINT }}