Upload index to bucket directly (#1)
All checks were successful
Continuous Integration / Generate index.html (push) Successful in 11s
All checks were successful
Continuous Integration / Generate index.html (push) Successful in 11s
Instead of just creating the file and uploading it to Gitea via workflow, why not upload it directly to the bucket that is meant for? Exactly, so that's what changed. Reviewed-on: #1
This commit is contained in:
parent
3b6c3dddab
commit
b825d865d2
@ -18,8 +18,4 @@ jobs:
|
|||||||
APPLICATION_KEY_ID: ${{ secrets.APPLICATION_KEY_ID }}
|
APPLICATION_KEY_ID: ${{ secrets.APPLICATION_KEY_ID }}
|
||||||
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
|
|
@ -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")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user