Skip to content

Commit 97909d8

Browse files
committed
MAINT: Phase 1 - Add HTML archives to GitHub release assets
Implements Phase 1 from issue #661: HTML archive backup on releases. Changes: - Add step to create compressed HTML archive after build - Generate SHA256 checksum for integrity verification - Create metadata manifest with build information - Upload archive, checksum, and manifest to GitHub releases Release assets created on each publish-* tag: - lecture-python-html-{tag}.tar.gz - Full HTML site archive - html-checksum.txt - SHA256 verification file - html-manifest.json - Build metadata (tag, commit, size, file count) This establishes backup infrastructure before gh-pages history cleanup and provides historical restore points for all future deployments.
1 parent c027427 commit 97909d8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,32 @@ jobs:
7373
shell: bash -l {0}
7474
run: |
7575
jb build lectures --path-output ./ -n -W --keep-going
76+
# Create HTML archive for release assets
77+
- name: Create HTML archive
78+
shell: bash -l {0}
79+
run: |
80+
tar -czf lecture-python-html-${{ github.ref_name }}.tar.gz -C _build/html .
81+
sha256sum lecture-python-html-${{ github.ref_name }}.tar.gz > html-checksum.txt
82+
83+
# Create metadata manifest
84+
cat > html-manifest.json << EOF
85+
{
86+
"tag": "${{ github.ref_name }}",
87+
"commit": "${{ github.sha }}",
88+
"timestamp": "$(date -Iseconds)",
89+
"size_mb": $(du -sm _build/html | cut -f1),
90+
"file_count": $(find _build/html -type f | wc -l)
91+
}
92+
EOF
93+
- name: Upload archives to release
94+
uses: softprops/action-gh-release@v1
95+
with:
96+
files: |
97+
lecture-python-html-${{ github.ref_name }}.tar.gz
98+
html-checksum.txt
99+
html-manifest.json
100+
env:
101+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76102
- name: Deploy website to gh-pages
77103
uses: peaceiris/actions-gh-pages@v4
78104
with:

0 commit comments

Comments
 (0)