Upload index to bucket directly #1

Merged
lukas merged 3 commits from upload-index-to-b2 into main 2024-07-24 23:51:16 +02:00
2 changed files with 3 additions and 6 deletions

View File

@ -19,7 +19,3 @@ jobs:
BUCKET_NAME: ${{ vars.BUCKET_NAME }} BUCKET_NAME: ${{ vars.BUCKET_NAME }}
BASE_URL: ${{ vars.BASE_URL }} BASE_URL: ${{ vars.BASE_URL }}
run: python3 script.py run: python3 script.py
- name: Upload build artifacts
uses: christopherhx/gitea-upload-artifact@v4
with:
path: index.html

View File

@ -60,5 +60,6 @@ output_file = 'index.html'
with open(output_file, 'w') as f: with open(output_file, 'w') as f:
f.write(html_content) f.write(html_content)
print(f"HTML file '{output_file}' has been created with links to all files in the bucket.") # Upload file to bucket
bucket.upload_local_file(local_file=output_file, file_name="index.html")