Install AWS CLI and deploy with S3 sync

The Hugo native deployment was not working correctly with the Scaleway
object storage. This commit installs the AWS CLI and uses `aws s3 sync`
instead.
This commit is contained in:
darnodo
2025-11-19 17:12:35 +01:00
parent a44b42eb97
commit 6c5debee3f

View File

@@ -30,9 +30,16 @@ jobs:
- name: Build Hugo site - name: Build Hugo site
run: hugo --minify run: hugo --minify
- name: Deploy to Object Storage (Hugo native) - name: Install AWS CLI
run: | run: |
hugo deploy --force --maxDeletes -1 apt-get update
apt-get install -y awscli
- name: Deploy to Object Storage
run: |
aws s3 sync public/ s3://notebook-arnodo-fr/ \
--endpoint-url=https://s3.fr-par.scw.cloud \
--delete
env: env:
AWS_ACCESS_KEY_ID: ${{ secrets.SCW_ACCESS_KEY_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.SCW_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCW_SECRET_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.SCW_SECRET_ACCESS_KEY }}