diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c15f590..095fc3c 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -17,13 +17,18 @@ jobs: name: website path: './public' # upload to s3 - - name: Configure AWS CLI for Hetzner S3 + - name: Install s3cmd run: | - aws configure set aws_access_key_id ${{ secrets.S3_KEY_ID }} - aws configure set aws_secret_access_key ${{ secrets.S3_SECRET_ACCESS_KEY }} - aws configure set s3.region 'fsn1' - aws configure set s3.host_base 'fsn1.your-objectstorage.com' - aws configure set s3.host_bucket '%(bucket)s.fsn1.your-objectstorage.com' + pip install s3cmd + - name: Configure s3cmd + run: | + echo "[default]" > ~/.s3cfg + echo "access_key = ${{ secrets.S3_KEY_ID }}" >> ~/.s3cfg + echo "secret_key = ${{ secrets.S3_SECRET_KEY }}" >> ~/.s3cfg + echo "endpoint_url = https://fsn1.your-objectstorage.com" >> ~/.s3cfg + echo "host_base = fsn1.storage.hetzner.com" >> ~/.s3cfg + echo "host_bucket = %(bucket)s.fsn1.storage.hetzner.com" >> ~/.s3cfg + echo "use_https = True" >> ~/.s3cfg - name: Upload files to Hetzner S3 run: | - aws s3 sync ./public ${{ secrets.S3_BUCKET }} --delete + s3cmd sync ./public ${{ secrets.S3_BUCKET }} --delete