fix(ci): compress rustdoc artifact to prevent upload stall
The VPS runner's limited bandwidth causes upload-artifact to stall when uploading hundreds of MB of individual HTML files. Compress crate-docs into a tar.gz before upload and extract on the publish side. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -102,12 +102,15 @@ jobs:
|
||||
|
||||
inject_simple_analytics "$docs_dir" "$script_content"
|
||||
- run: echo "<meta http-equiv=refresh content=0;url=pezkuwi_sdk_docs/index.html>" > ./crate-docs/index.html
|
||||
- name: Compress docs for upload
|
||||
run: tar czf crate-docs.tar.gz -C . crate-docs/
|
||||
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ github.sha }}-doc
|
||||
path: ./crate-docs/
|
||||
path: crate-docs.tar.gz
|
||||
retention-days: 1
|
||||
if-no-files-found: error
|
||||
compression-level: 0
|
||||
|
||||
build-implementers-guide:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -168,7 +171,13 @@ jobs:
|
||||
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
|
||||
with:
|
||||
name: ${{ github.sha }}-doc
|
||||
path: ${{ github.head_ref || github.ref_name }}
|
||||
path: /tmp/rustdocs
|
||||
- name: Extract rustdocs
|
||||
run: |
|
||||
tar xzf /tmp/rustdocs/crate-docs.tar.gz -C .
|
||||
mv crate-docs ${REF_NAME}
|
||||
env:
|
||||
REF_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
- name: Download guide
|
||||
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user