Skip to content

Commit d3845d4

Browse files
authored
Merge branch 'main' into lqramsey
2 parents 0b09889 + 65a6db8 commit d3845d4

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
@@ -72,6 +72,32 @@ jobs:
7272
run: |
7373
rm -r _build/.doctrees
7474
jb build lectures --path-output ./
75+
# Create HTML archive for release assets
76+
- name: Create HTML archive
77+
shell: bash -l {0}
78+
run: |
79+
tar -czf lecture-python-advanced-html-${{ github.ref_name }}.tar.gz -C _build/html .
80+
sha256sum lecture-python-advanced-html-${{ github.ref_name }}.tar.gz > html-checksum.txt
81+
82+
# Create metadata manifest
83+
cat > html-manifest.json << EOF
84+
{
85+
"tag": "${{ github.ref_name }}",
86+
"commit": "${{ github.sha }}",
87+
"timestamp": "$(date -Iseconds)",
88+
"size_mb": $(du -sm _build/html | cut -f1),
89+
"file_count": $(find _build/html -type f | wc -l)
90+
}
91+
EOF
92+
- name: Upload archives to release
93+
uses: softprops/action-gh-release@v1
94+
with:
95+
files: |
96+
lecture-python-advanced-html-${{ github.ref_name }}.tar.gz
97+
html-checksum.txt
98+
html-manifest.json
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75101
- name: Deploy website to gh-pages
76102
uses: peaceiris/actions-gh-pages@v4
77103
with:

0 commit comments

Comments
 (0)